diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 10:19:39 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 10:19:39 +0000 |
commit | 84f768b4cac9fe17e2f8987143ec0285fdff7e28 (patch) | |
tree | 646529aef29366c579b4b2d65c6834f04c23cfa3 /io.c | |
parent | e86d271d9605bda1b19d534e108054e2902613da (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
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |