[DOC] Update ARGF.readlines documentation to match/reference IO.readlines.

This commit is contained in:
Ryan Davis 2023-12-01 14:51:08 -08:00 committed by GitHub
parent 0aed37b973
commit 6ecc1ca9b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
io.c
View File

@ -10468,19 +10468,21 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv)
/* /*
* call-seq: * call-seq:
* ARGF.readlines(sep = $/) -> array * ARGF.readlines(sep = $/, chomp: false) -> array
* ARGF.readlines(limit) -> array * ARGF.readlines(limit, chomp: false) -> array
* ARGF.readlines(sep, limit) -> array * ARGF.readlines(sep, limit, chomp: false) -> array
* *
* ARGF.to_a(sep = $/) -> array * ARGF.to_a(sep = $/, chomp: false) -> array
* ARGF.to_a(limit) -> array * ARGF.to_a(limit, chomp: false) -> array
* ARGF.to_a(sep, limit) -> array * ARGF.to_a(sep, limit, chomp: false) -> array
* *
* Reads each file in ARGF in its entirety, returning an Array containing * Reads each file in ARGF in its entirety, returning an Array containing
* lines from the files. Lines are assumed to be separated by _sep_. * lines from the files. Lines are assumed to be separated by _sep_.
* *
* lines = ARGF.readlines * lines = ARGF.readlines
* lines[0] #=> "This is line one\n" * lines[0] #=> "This is line one\n"
*
* See +IO.readlines+ for a full description of all options.
*/ */
static VALUE static VALUE
argf_readlines(int argc, VALUE *argv, VALUE argf) argf_readlines(int argc, VALUE *argv, VALUE argf)