brianmario / yajl-ruby

A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)
http://rdoc.info/projects/brianmario/yajl-ruby
MIT License
1.48k stars 169 forks source link

Calling Yajl.load with ARGF hangs after last object #224

Open daniels opened 2 years ago

daniels commented 2 years ago

Calling Yajl.load(ARGF) will hang after the last object has been yielded.

E.g.

echo '{"a": 1}' | ruby -ryajl -e 'Yajl.load(ARGF) {|o| p o }'

Will output

{"a"=>1}

and then hang indefinitely.