1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] Fix documentation for ARGF#readlines

[Bug #18909]
This commit is contained in:
Peter Zhu 2022-07-14 16:45:03 -04:00
parent c53439294e
commit 280b805d04
Notes: git 2022-07-15 23:31:09 +09:00

8
io.c
View file

@ -10102,16 +10102,16 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv)
/*
* call-seq:
* ARGF.readlines(sep=$/) -> array
* ARGF.readlines(sep = $/) -> array
* ARGF.readlines(limit) -> array
* ARGF.readlines(sep, limit) -> array
*
* ARGF.to_a(sep=$/) -> array
* ARGF.to_a(sep = $/) -> array
* ARGF.to_a(limit) -> array
* ARGF.to_a(sep, limit) -> array
*
* Reads +ARGF+'s current file in its entirety, returning an +Array+ of its
* lines, one line per element. Lines are assumed to be separated by _sep_.
* 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 = ARGF.readlines
* lines[0] #=> "This is line one\n"