Project

General

Profile

Bug #1693

ARGF.rewind Doesn't Reset ARGF.lineno

Added by runpaint (Run Paint Run Run) about 10 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-06-25 trunk 23854) [i686-linux]
[ruby-core:24046]

Description

=begin
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

=end

History

#1

Updated by runpaint (Run Paint Run Run) about 10 years ago

=begin
This seems to be resolved on 1.9 now; 1.8 is still affected.
=end

#2

Updated by nahi (Hiroshi Nakamura) almost 10 years ago

=begin
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%
=end

Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Open to Rejected

This WONTFIX on 1.8.

Also available in: Atom PDF