[前][次][番号順一覧][スレッド一覧]

ruby-changes:40408

From: nobu <ko1@a...>
Date: Sun, 8 Nov 2015 14:08:11 +0900 (JST)
Subject: [ruby-changes:40408] nobu:r52489 (trunk): io.c: [DOC] IO#gets [skip ci]

nobu	2015-11-08 14:08:03 +0900 (Sun, 08 Nov 2015)

  New Revision: 52489

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52489

  Log:
    io.c: [DOC] IO#gets [skip ci]
    
    * io.c (rb_io_gets_m): [DOC] add example using limit argument.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 52488)
+++ io.c	(revision 52489)
@@ -3292,6 +3292,8 @@ rb_io_gets(VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L3292
  *     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:
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]