boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...
MIT License
734 stars 156 forks source link

Error in new release 1.0.17 #171

Closed chuchiperriman closed 4 years ago

chuchiperriman commented 4 years ago

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)
cedricfey commented 4 years ago

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

boazsegev commented 4 years ago

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.