mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
io.c: [DOC] IO#gets [skip ci]
* io.c (rb_io_gets_m): [DOC] add example using limit argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fdc4f68f90
commit
eb28bd8057
1 changed files with 2 additions and 0 deletions
2
io.c
2
io.c
|
@ -3292,6 +3292,8 @@ rb_io_gets(VALUE io)
|
|||
* File.new("testfile").gets #=> "This is line one\n"
|
||||
* $_ #=> "This is line one\n"
|
||||
*
|
||||
* File.new("testfile").gets(4)#=> "This"
|
||||
*
|
||||
* If IO contains multibyte characters byte then <code>gets(1)</code>
|
||||
* returns character entirely:
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue