summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);