summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/sample_spec.rb
AgeCommit message (Collapse)Author
2025-02-02[Bug #21106] Fix tests for custom random objectNobuyoshi Nakada
When a positive integer limit is given, `rand` method of a RNG object is expected to return a value between 0 and the limit (exclusive). Fix shuffle_spec.rb like as the similar code in sample_spec.rb, and add tests for greater values. TODO: - Return a value that is equal to or greater than the limit given to the RNG object. - Extract common code about RNG objects to a shared file. Notes: Merged: https://github.com/ruby/ruby/pull/12690
2023-04-25Update to ruby/spec@7f69c86Benoit Daloze
2022-06-26Update to ruby/spec@ab32a1aBenoit Daloze
2022-03-28Update to ruby/spec@aaf998fBenoit Daloze
2020-12-21Use Integer instead of Fixnum/BignumNobuyoshi Nakada
2020-01-27Removed useless "spec"sNobuyoshi Nakada
It is not specific to particular methods that keyword option arguments are coerced to `Hash`es using `to_hash` method.
2020-01-26Moved Array#sample to rbincNobuyoshi Nakada
2019-07-27Update to ruby/spec@875a09eBenoit Daloze
2018-03-04Update to ruby/spec@c1b568beregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-20Move spec/rubyspec to spec/ruby for consistencyeregon
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e