summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
commitf5da3b6746dba18ab86d11aa49caf97b37ecc6ac (patch)
tree1c472d11ebd04c612140d228a7a5414d3a08e615 /random.c
parent264c52f2e6abc33f09e6a891f67bdf7bddbae406 (diff)
1.1c4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/random.c b/random.c
index 6adfc59eb0..e9dbf3e26c 100644
--- a/random.c
+++ b/random.c
@@ -119,7 +119,7 @@ static VALUE
f_rand(obj, vmax)
VALUE obj, vmax;
{
- int val, max;
+ long val, max;
switch (TYPE(vmax)) {
case T_BIGNUM:
@@ -131,7 +131,7 @@ f_rand(obj, vmax)
break;
}
- max = NUM2INT(vmax);
+ max = NUM2LONG(vmax);
if (max == 0) {
return float_new(RANDOM_NUMBER);
}