Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: SAX::ParserContext keeps a reference to the input (#3395)
**What problem is this PR intended to solve?** I saw a failure in CI at https://github.com/sparklemotion/nokogiri/actions/runs/12529532790/job/34945362057?pr=3393 ``` 1) Error: Nokogiri::HTML4::SAX::ParserContext::constructor::encoding::.io#test_0001_supports passing encoding name: NotImplementedError: method `read' called on terminated object (0x0000005520809790) test/html4/sax/test_parser_context.rb:60:in `parse_with' test/html4/sax/test_parser_context.rb:60:in `block (5 levels) in <module:SAX>' ``` So now the class keeps a reference to the input object to prevent it from being GCed before we parse it. **Have you included adequate test coverage?** Yes. **Does this change affect the behavior of either the C or the Java implementations?** N/A
- Loading branch information