From: "JohanJosefsson (Johan Josefsson)" Date: 2022-07-15T06:33:57+00:00 Subject: [ruby-core:109214] [Ruby master Bug#18909] ARGF.readlines reads more than current file Issue #18909 has been updated by JohanJosefsson (Johan Josefsson). Hm���if I understand it correctly, this just changed the documentation to conform to a strange behavior. Strange in the sense that the -i (inplace) option becomes meaningless in the case of multiple files an ARGV.readlines. Would it not be better to keep the documentation and change the implementation so it conforms? ---------------------------------------- Bug #18909: ARGF.readlines reads more than current file https://bugs.ruby-lang.org/issues/18909#change-98350 * Author: JohanJosefsson (Johan Josefsson) * Status: Open * Priority: Normal * ruby -v: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- 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?). -- https://bugs.ruby-lang.org/ Unsubscribe: