Project

General

Profile

Actions

Bug #18909

closed

ARGF.readlines reads more than current file

Added by JohanJosefsson (Johan Josefsson) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
[ruby-core:109193]

Description

The docuentation says that ARGF.readlines: Reads ARGF's current file in its entirety , but this is what happens:

$ cat fileA A $ cat fileB B $ ruby -e 'puts ARGF.readlines' fileA fileB A B
i.e. it reads both the current file and the next one (all files?).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0