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

ruby-changes:41858

From: usa <ko1@a...>
Date: Thu, 25 Feb 2016 19:18:57 +0900 (JST)
Subject: [ruby-changes:41858] usa:r53932 (ruby_2_1): * io.c (io_read_nonblock): decrement argc before calling io_readpartical() if

usa	2016-02-25 19:19:39 +0900 (Thu, 25 Feb 2016)

  New Revision: 53932

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

  Log:
    * io.c (io_read_nonblock): decrement argc before calling io_readpartical() if
      kwarg is eaten in this function.  fixed a test failure introduced at r53926.
      see [Backport #11885]

  Modified files:
    branches/ruby_2_1/io.c
Index: ruby_2_1/io.c
===================================================================
--- ruby_2_1/io.c	(revision 53931)
+++ ruby_2_1/io.c	(revision 53932)
@@ -2598,8 +2598,10 @@ io_read_nonblock(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/io.c#L2598
 
     rb_scan_args(argc, argv, "11:", NULL, NULL, &opts);
 
-    if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
+    if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception)) {
 	no_exception = 1;
+	argc--;
+    }
 
     ret = io_getpartial(argc, argv, io, 1, no_exception);
 

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

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