summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-25 10:19:39 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-25 10:19:39 +0000
commit84f768b4cac9fe17e2f8987143ec0285fdff7e28 (patch)
tree646529aef29366c579b4b2d65c6834f04c23cfa3
parente86d271d9605bda1b19d534e108054e2902613da (diff)
* 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
-rw-r--r--io.c4
1 files changed, 3 insertions, 1 deletions
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);