summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index 9a843f2aff..a317aa5cc1 100644
--- a/random.c
+++ b/random.c
@@ -266,7 +266,7 @@ rb_f_rand(argc, argv, obj)
vmax = rb_Integer(vmax);
if (TYPE(vmax) == T_BIGNUM) goto bignum;
case T_FIXNUM:
- max = NUM2LONG(vmax);
+ max = FIX2LONG(vmax);
break;
}