summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
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 d5896fe2d3..36292114f3 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1411,7 +1411,7 @@ int_step(from, to, step)
VALUE i = from;
ID cmp;
- if (NUM2INT(step) == 0) {
+ if (rb_equal(step, INT2FIX(0))) {
rb_raise(rb_eArgError, "step cannot be 0");
}