summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:08:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:08:03 +0000
commiteb28bd805723d5d2f67dcea7f3d4f1026c431551 (patch)
treedbc0043ccae559e4c38120734f3677b734d4208d
parentfdc4f68f90319ee00094a43a4312bc55efd57b99 (diff)
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
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index c546edf..a192257 100644
--- a/io.c
+++ b/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:
*