Bug #1693: ARGF.rewind Doesn't Reset ARGF.lineno
http://redmine.ruby-lang.org/issues/show/1693
Author: Run Paint Run Run
Status: Open, Priority: Low
ruby -v: ruby 1.9.2dev (2009-06-25 trunk 23854) [i686-linux]
ARGF.rewind doesn't reset the current line number to 0. IO#rewind does.
This happens on all Ruby versions I have installed locally.
$ ruby -ve 'p ARGF.lineno; ARGF.readline; ARGF.rewind; p
ARGF.lineno' /etc/passwd
ruby 1.9.2dev (2009-06-25 trunk 23854) [i686-linux]
0
1
on 2009-06-26 12:26
on 2009-09-04 19:35
Issue #1693 has been updated by Run Paint Run Run. This seems to be resolved on 1.9 now; 1.8 is still affected. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1693
on 2009-12-08 13:18
Issue #1693 has been updated by Hiroshi NAKAMURA. 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% ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1693
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.