From 83b7c779b1ecf965056ceaffe13f06141e119212 Mon Sep 17 00:00:00 2001 From: Bo Date: Sun, 10 Nov 2024 16:50:44 +0700 Subject: [PATCH] fix frozen string literals --- lib/combine_pdf/page_methods.rb | 2 +- lib/combine_pdf/pdf_public.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/combine_pdf/page_methods.rb b/lib/combine_pdf/page_methods.rb index e9a8d20..7e5d884 100644 --- a/lib/combine_pdf/page_methods.rb +++ b/lib/combine_pdf/page_methods.rb @@ -789,7 +789,7 @@ def encode_text(text, fonts) # add to array if out.last.nil? || out.last[0] != fonts[i] out.last[1] << '>' unless out.last.nil? - out << [fonts[i], '<', 0, 0] + out << [fonts[i], (+'<'), 0, 0] end out.last[1] << (fonts_array[i].cmap.nil? ? (c.unpack('H*')[0]) : fonts_array[i].cmap[c]) if fonts_array[i].metrics[c] diff --git a/lib/combine_pdf/pdf_public.rb b/lib/combine_pdf/pdf_public.rb index 5fe665f..abe1257 100644 --- a/lib/combine_pdf/pdf_public.rb +++ b/lib/combine_pdf/pdf_public.rb @@ -217,7 +217,7 @@ def to_pdf(options = {}) # when finished, remove the numbering system and keep only pointers remove_old_ids # output the pdf stream - out.join("\n").force_encoding(Encoding::ASCII_8BIT) + out.join("\n".b).force_encoding(Encoding::ASCII_8BIT) end # this method returns all the pages cataloged in the catalog.