summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 5920f25fc4..2c69498c13 100644
--- a/vm.c
+++ b/vm.c
@@ -422,7 +422,8 @@ vm_stat(int argc, VALUE *argv, VALUE self)
VALUE arg = Qnil;
VALUE hash = Qnil, key = Qnil;
- if (rb_scan_args(argc, argv, "01", &arg) == 1) {
+ if (rb_check_arity(argc, 0, 1) == 1) {
+ arg = argv[0];
if (SYMBOL_P(arg))
key = arg;
else if (RB_TYPE_P(arg, T_HASH))