diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-09 09:01:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-09 09:01:40 +0000 |
commit | e3efce6df1aa691e17c59f442b35b4fd129d3a13 (patch) | |
tree | e1c5aed7b54721ba5a8a114bec1af03870545203 /ChangeLog | |
parent | 7f8e5584649b1bba6d30d78c661a1b1eca28340e (diff) | |
download | ruby-e3efce6df1aa691e17c59f442b35b4fd129d3a13.tar.gz |
array.c: use rb_random_ulong_limited
* array.c (rb_ary_sample): use rb_random_ulong_limited, since
precision of long may be larger than double.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,7 @@ -Tue Oct 9 17:59:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> +Tue Oct 9 18:01:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * array.c (rb_ary_sample): use rb_random_ulong_limited, since + precision of long may be larger than double. * random.c (rb_random_ulong_limited): new function to return a random value from 0 upto limit as unsigned long, simillary to |