summaryrefslogtreecommitdiff
path: root/test/ruby/test_rand.rb
AgeCommit message (Collapse)Author
2011-06-30* test/ruby/test_rand.rb (test_random_bytes): fold mysteriouslynobu
long line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24* random.c (random_s_rand, Init_Random): Random.rand should behave asmrkn
Random::DEFAULT.rand rather than Kernel#rand. * random.c (rand_range, random_rand): rand_range function extracted from random_rand function. * random.c (rb_f_rand): accept a Range argument as Random#rand [ruby-dev:43427] #4605 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-12* lib/test/unit.rb (assert_include): add alias.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-20* random.c (random_rand): get rid of overflow.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* array.c (rb_ary_shuffle_bang, rb_ary_sample): add optionalnobu
argument random. [ruby-dev:41923] [EXPERIMENTAL] * random.c (rb_random_{int32,real,bytes}): fallback to normal method invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* complex.c (nucomp_marshal_load): should check the argument.nobu
[ruby-core:31622] * rational.c (nurat_marshal_load): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03* random.c (Init_Random): add Random::DEFAULT.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05add an assertion message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-26* random.c (random_rand): subtraction method of non-numeric cannobu
return Float, and add the result of random to the beginning of range, not the opposite. [ruby-dev:41410] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-12add a test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-07* random.c (rand_init): ignore higher bits if all they are same asnobu
the lower sign bit. [ruby-core:29292](2) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03* random.c (random_rand): raise ArgumentError on nil, as thenobu
documentation implies. [ruby-core:29075] * random.c (rb_f_rand): mentioned the case of when max is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-15* random.c (rb_reset_random_seed): set seed in this. [ruby-core:28655]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* random.c (random_rand): fixed for edge cases of ranges.nobu
[ruby-dev:39166] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* random.c (random_rand): unified random_int and random_float.nobu
[ruby-dev:39158]. and fixes [ruby-core:24655], [ruby-core:24677], [ruby-core:24679]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-02* random.c (rb_random_int): arguments have to be converted tonobu
integer. [ruby-core:24679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-02* test/ruby/test_rand.rb: add tests for Random#float's rejectionmame
against Infinity and NaN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-02* random.c (rand_int): prevent from GC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* test/ruby/test_rand.rb: add tests for Random class.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21* test/ruby/test_rand.rb (test_big_seed): tests also instance methods.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21* random.c (rand_init): array length of random seed was broken, whichmame
causes memory error with srand(2**1000000-1). * test/ruby/test_rand.c: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* random.c (rb_random_t): objectified. [EXPERIMENTAL]nobu
[ruby-dev:30954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29* random.c (rb_f_rand): type check simplified. strings are nomatz
longer allowed for argument. [ruby-dev:37655] * test/ruby/test_rand.rb (TestRand::o.to_int): need override to_int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25* test/ruby/test_rand.rb: add tests to achieve over 95% test coveragemame
of random.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07add test_rand_0x100000000.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-04* random.c (init_by_array): imported from mt19937ar-cok.tgz.akr
(genrand_int32): ditto. (genrand_real): replaced with genrand_res53 in mt19937ar-cok. (rand_init): support bignum for longer seed. (random_seed): generate longer seed. (make_mask): new function. (limited_rand): ditto. (limited_big_rand): ditto. (rb_f_rand): call limited_rand and limited_big_rand. [ruby-dev:25403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e