summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 0b5f7c14e4..8e890d4a67 100644
--- a/iseq.c
+++ b/iseq.c
@@ -3183,8 +3183,7 @@ rb_iseqw_local_variables(VALUE iseqval)
static VALUE
iseqw_to_binary(int argc, VALUE *argv, VALUE self)
{
- VALUE opt;
- rb_scan_args(argc, argv, "01", &opt);
+ VALUE opt = !rb_check_arity(argc, 0, 1) ? Qnil : argv[0];
return rb_iseq_ibf_dump(iseqw_check(self), opt);
}