From 84f768b4cac9fe17e2f8987143ec0285fdff7e28 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 25 Feb 2016 10:19:39 +0000 Subject: * 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io.c b/io.c index 8c60128e0f..08775f111c 100644 --- a/io.c +++ b/io.c @@ -2598,8 +2598,10 @@ io_read_nonblock(int argc, VALUE *argv, VALUE io) 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); -- cgit v1.2.3