boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in new release 1.0.17

chuchiperriman opened this issue · comments

Error when updated to 1.0.17, 1.0.16 works fine:

no implicit conversion of Symbol into Integer

Example code:

combined_pdf = CombinePDF.new
# Error in this line
combined_pdf << CombinePDF.load(pdf.path)
tmp_file = Tempfile.new(%w[pdf_merged .pdf], 'tmp').path
combined_pdf.save(tmp_file)

Same here, the error seems to happen at combine_pdf/parser.rb:533

commented

Thank you so much, @chuchiperriman for exposing this issue.

I have no idea how the test suite passed and this little bit of code failed (although it doesn't fail with all PDF files, it seems a long shot that none of the example PDF files I test against exposed this issue)...

Thanks again 👏🏻👏🏻👏🏻🙏🏻🙏🏻👍🏻

Patched in 1.0.18.