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 cc53c3660a..0a172a3965 100644
--- a/numeric.c
+++ b/numeric.c
@@ -785,7 +785,7 @@ rb_num2long(val)
return Qnil; /* not reached */
default:
- val = rb_Integer(val);
+ val = rb_to_int(val);
return NUM2LONG(val);
}
}