[Feature #3649] Array#sample, Array#shuffle, Array#shuffle! $B$G;HMQ$9$kMp?t@[email protected]$r;XDj$9$k$?$a$K%

Feature #3649: Array#sample, Array#shuffle, Array#shuffle!
e$B$G;HMQ$9$kMp?t@[email protected]$r;XDj$9$k$?$a$K%*%W%7%g%J%k0z?t$rDI2C$9$ke(B
http://redmine.ruby-lang.org/issues/show/3649

e$B5/I<<Te(B: Kenta M.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: core, Target version: 1.9.x

Array#sample, Array#shuffle, Array#shuffle!
e$B$Ne(B3e$B%a%=%C%I$OG[Ns$NMWAG$KBP$7$FMp?t$rE,MQ$5$;$k%a%=%C%I$G$9!#e(B
e$B$3$l$i$N%a%=%C%I$,;HMQ$9$kMp?t@[email protected]$Oe(B Ruby
e$B%$%s%?%W%j%?$,%G%U%)%k%H$G;}$C$F$$$k$b$N$K8GDj$5$l$F$*$j!"JQ99$9$k$3$H$,$G$-$^$;$s!#e(B

e$B$=$3$G!“0J2<$N$h$&$KMp?t@[email protected]$r;XDj$G$-$k$h$&!”$3$l$i$N%a%=%C%I$KBP$7$F%*%W%7%g%J%k0z?t$rF3F~$9$k$3$H$rDs0F$7$^$9!#e(B

gen = Random.new
[*1…6].sample(3, random: gen)
[*1…6].shuffle(random: gen)
[*1…6].shuffle!(random: gen)

e$BDI2C$9$ke(B patch e$B$O!"CfED$5$s$,:n@.$7$?e(B Array#sample
e$B$X$NJQ99$KBP$7$F!"e(B
e$B;d$,e(B Array#shuffle e$B$He(B Array#shuffle!
e$B$X$NJQ99$rDI2C$7$?$b$N$K$J$C$F$$$^$9!#e(B

e$B%A%1%C%He(B #3649 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r29083.
Kenta, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


http://redmine.ruby-lang.org/issues/show/3649