11 Commits

Author SHA1 Message Date
KOBAYASHI Shuji 2ae727ac3a Add Array#sample test
And simplify tests for `Array#shuffle` and `Array#shuffle!`.
2019-04-17 21:04:46 +09:00
KOBAYASHI Shuji d53eb8a377 Fix missing assertions in mruby-random test 2019-04-15 19:03:39 +09:00
Yukihiro "Matz" Matsumoto afca99a40b Remove implicit conversion using to_int method.
The ISO standard does not include implicit type conversion using
`to_int`. This implicit conversion often causes vulnerability.
There will be no more attacks like #4120.

In addition, we have added internal convenience method `__to_int` which
does type check and conversion (from floats).
2018-11-19 11:28:51 +09:00
Bouke van der Bijl c7262be0ae Fix segfault in Array#sample 2016-11-23 11:21:14 -05:00
Nobuyoshi Nakada ab67c57f65 remove trailing spaces 2014-04-30 09:50:14 +09:00
take_cheeze 77fba20480 reduce mrb_open calls in mrbgem test 2014-03-10 04:45:28 +09:00
Emiliano Lesende 80d8b5e2e7 Added support for Random as an argument to shuffle and shuffle!. Refactored random gem to use DATA instance type and hold mt_state inside the DATA_PTR instead of in an instance variable. 2013-11-02 12:07:34 -03:00
Emiliano Lesende d8cc37cdf9 Added shuffle and shuffle! to the Array class in the Random gem. 2013-11-01 11:44:40 -03:00
MATSUMOTO Ryosuke 6e110cb43d Add test for Random::srand 2013-03-27 12:02:59 +09:00
mattn 46c13080f9 Fix test for mruby-random 2013-03-27 11:50:52 +09:00
mattn 00326ba7f1 Add test for mruby-random 2013-03-27 11:47:33 +09:00