% ruby cli.rb
(offline mode: enter name=value pairs on standard input)
/Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:595:in tty?': closed stream (IOError) from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:595:in read_from_cmdline'
from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:645:in initialize_query' from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:806:in initialize'
from cli.rb:4:in new' from cli.rb:4:in '
This issue was solved with changeset r34409.
Hiroshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
io.c (argf_close): skip stdin, which should be readable again. [ruby-dev:45160] [Bug #5952]
io.c (argf_readlines): reinitialize after all read to be
readable again.