Issue #5584 has been updated by mame (Yusuke Endoh).

Status changed from Open to Rejected

??????????????????対?????? feedback ??????????????????????

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Feature #5584: Array#sample!
https://bugs.ruby-lang.org/issues/5584#change-25251

Author: Glass_saga (Masaki Matsushita)
Status: Rejected
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


=begin
?????????????????????????????????????????????????????????????Array#sample!??追????????????????????

????????????????????????????????????????????????????

 a = (1..5).to_a
 a.delete_at(rand(a.size)) #=> 3
 p a #=> [1, 2, 4, 5]
 
??????????????????????????????Array#sample!????????????

 a = (1..5).to_a
 a.sample! #=> 4
 p a #=> [1, 2, 3, 5]

??簡????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????

 a = (1..10).to_a
 p a.sample!(5) #=> [5, 4, 2, 6, 7]
 p a #=> [1, 3, 8, 9, 10]

????????????????????????????????????????????以??????Array#sample????????????????????????

 [].sample! #=> nil
 [].sample!(1) #=> []
 [1,2,3].sample!(random: rand) #=> 2

patch???添????????????
=end


-- 
http://bugs.ruby-lang.org/