Project

General

Profile

This project is closed and read-only.

Actions

Bug #1693

closed

ARGF.rewind Doesn't Reset ARGF.lineno

Bug #1693: ARGF.rewind Doesn't Reset ARGF.lineno

Added by runpaint (Run Paint Run Run) over 17 years ago. Updated over 14 years ago.

Status:
Rejected
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

Actions

Also available in: PDF Atom