You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed an issue with IOSource#read_until when reaching the end of a file (#288)
FixGH-287
## Why?
If `@source = nil` is set at the end of the file, prevent
`IOSource#read_until` from raising an error.
> /.gems/gems/rexml-3.4.2/lib/rexml/parsers/baseparser.rb:524:in
'REXML::Parsers::BaseParser#pull_event': #<NoMethodError: undefined
method 'eof?' for nil> (REXML::ParseException)
> .gems/gems/rexml-3.4.2/lib/rexml/source.rb:275:in
'REXML::IOSource#read_until'
https://github.com/ruby/rexml/blob/185bdc737da406ba4f9564726849ad3477858eb2/lib/rexml/source.rb#L266-L276
1. Reaching the end of a file in `IOSource#read`.
2. If the string remains in `@scanner.rest`, use
`@scanner.scan_until(pattern)` to return `str`.
3. If `@source` is `nil`, an exception occurs.
0 commit comments