Feature #4147: Array#sample ??ч????帥?????絎??????????
http://redmine.ruby-lang.org/issues/show/4147

起票???: Yoji Ojima
??鴻????若?帥??: Open, ????綺?: Normal

Array#sample ????????????羝<???????????????????????祉????ゃ??荀?膣???????帥?????篏????????????????????с??????????????

筝?荐????泣?潟?????с??"紊у??" ??? "???" ??? 1000 ?????腆?????ч?御?????????????????????????????с?????

omikuji_box = [
  {:name => "紊у??", :weight => 1000},
  {:name => "筝??", :weight => 100},
  {:name => "絨???", :weight => 10},
  {:name => "???",   :weight => 1}
]
omikuji = omikuji_box.sample {|v| v[:weight] }
puts omikuji[:name]


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