summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-26 07:41:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-26 07:41:55 +0000
commit0eb31be6818ee400b30899f77f6bcbe0722ea35f (patch)
treeadc14d708bea40a4a376683f01458e1cc12a3273 /random.c
parentb3545895d1bb5a72e1311022c69b882d6ce90033 (diff)
downloadruby-0eb31be6818ee400b30899f77f6bcbe0722ea35f.tar.gz
* random.c (rb_random_int32): suppress warning on LP64 platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 25c9dea1ff..64b1cec4b1 100644
--- a/random.c
+++ b/random.c
@@ -894,7 +894,7 @@ rb_random_int32(VALUE obj)
#else
VALUE lim = rb_big_plus(ULONG2NUM(0xffffffff), INT2FIX(1));
#endif
- return NUM2ULONG(rb_funcall2(obj, id_rand, 1, &lim));
+ return (unsigned int)NUM2ULONG(rb_funcall2(obj, id_rand, 1, &lim));
}
return genrand_int32(&rnd->mt);
}