aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-30 01:08:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-30 01:17:55 +0900
commit59648af296ab15a2e34ebce62a7cc14deb889e7b (patch)
tree70280207aa841638e8aca72551b35c4db5f6d076 /numeric.c
parentf39314a98ac6e762e8f5d72d80923038b0b5f01a (diff)
downloadruby-59648af296ab15a2e34ebce62a7cc14deb889e7b.tar.gz
Suppress keyword argument warning from #step
* numeric.c (num_step): pass the extracted argument from keyword argument, not the last argument itself which should have been warned already.
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 5bf87bd752..c1655c0dbd 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2768,7 +2768,7 @@ num_step(int argc, VALUE *argv, VALUE from)
num_step_size, from, to, step, FALSE);
}
- RETURN_SIZED_ENUMERATOR(from, argc, argv, num_step_size);
+ return SIZED_ENUMERATOR(from, 2, ((VALUE [2]){to, step}), num_step_size);
}
desc = num_step_scan_args(argc, argv, &to, &step, TRUE, FALSE);