Bug #822: gets blocks when it shouldn't
http://redmine.ruby-lang.org/issues/show/822

Author: Ahmed Saeed
Status: Open, Priority: Normal
Category: core

r,w = IO.pipe
w.write("some text\n\n\nsome text\n\n\n")
puts r.gets("")
puts r.gets("")

When I used this code gets blocks on the second call. When the last newline character is replaced with any other character it works just fine.


----------------------------------------
http://redmine.ruby-lang.org