Bug #2461: ARGF.rewind does not reset ARGF.lineno to zero
http://redmine.ruby-lang.org/issues/show/2461

Author: Hiroshi NAKAMURA
Status: Open, Priority: Normal
Category: core, Target version: Ruby 1.8.8
ruby -v: ruby 1.8.8dev (2009-12-07 revision 25983) [i686-linux] 

0% ruby19 -ve 'ARGF.gets; ARGF.rewind; p [ARGF.lineno, $.]; ARGF.gets; p [ARGF.lineno, $.]' ~/.zshhist
ruby 1.9.2dev (2009-12-01 trunk 25970) [i686-linux]
[0, 1]
[1, 1]
0% ruby -ve 'ARGF.gets; ARGF.rewind; p [ARGF.lineno, $.]; ARGF.gets; p [ARGF.lineno, $.]' ~/.zshhist
ruby 1.8.8dev (2009-12-07 revision 25983) [i686-linux]
[1, 1]
[1, 1]
0%

1.9 is correct, right?


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