From 9ed3d415d10e26d7fe4a0b4d99ae5ae2ed1160f3 Mon Sep 17 00:00:00 2001 From: Chedli Bourguiba Date: Wed, 29 May 2024 15:57:09 +0200 Subject: [PATCH] Fix for frozen string literal to prepare for ruby 3.4 Cf. https://gist.github.com/fxn/bf4eed2505c76f4fca03ab48c43adc72 --- lib/wicked_pdf/tempfile.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wicked_pdf/tempfile.rb b/lib/wicked_pdf/tempfile.rb index b8079c0a..bcbd4c08 100644 --- a/lib/wicked_pdf/tempfile.rb +++ b/lib/wicked_pdf/tempfile.rb @@ -23,9 +23,9 @@ def write_in_chunks(input_string) def read_in_chunks rewind binmode - output_string = '' - output_string << read(chunk_size) until eof? - output_string + chunks = [] + chunks << read(chunk_size) until eof? + chunks.join rescue Errno::EINVAL => e raise e, file_too_large_message end