yob / pdf-reader

The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.
MIT License
1.82k stars 271 forks source link

PDF::Reader::ObjectHash#page_references should return an array of PDF::Reader::Reference #444

Closed yob closed 2 years ago

yob commented 2 years ago

In #421 I refactored PDF::Reader::ObjectHash to check they types of objects in pulls from the PDF file and raise when the object type is the wrong type.

In doing so, I inadvertently changed the page_references method to return an Array of PDF::Reader::Page objects, rather than the indirect references to them.

For most users it won't matter, but it might for some so it's a bug.

Interestingly, the RBI file already claims this method must return an array of PDF::Reader::Reference objects and the sorbet static type checks weren't failing.

Fixes #443

petergoldstein commented 2 years ago

@yob Any idea when this will be released in a gem? Thanks.

yob commented 2 years ago

I've just released 2.9.2 with this fix ❤️

petergoldstein commented 2 years ago

Thanks so much @yob