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 39703fae31..c24c49d9c7 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1483,7 +1483,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");
}