Commit 24a2b08
committed
ResumableParser: Reset err_info on EOS errors
Fix: #1008
I'm unfortunately unable to turn the reproduction script into
a test case there, I don't understand what is causing `err_info`
to be re-raised in the repro that doesn't work in test-unit.
```ruby
require 'json'
parser = JSON::ResumableParser.new({})
['{"message": "hello ', 'world"}', '[1,2]'].each do |chunk|
parser << chunk
begin
while parser.parse
p parser.value
end
rescue JSON::ParserError => e
p e
parser.clear
end
end
```1 parent 68bcf60 commit 24a2b08
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2412 | 2412 | | |
2413 | 2413 | | |
2414 | 2414 | | |
| 2415 | + | |
2415 | 2416 | | |
2416 | 2417 | | |
2417 | 2418 | | |
| |||
0 commit comments