Issue #7300 has been updated by knu (Akinori MUSHA).


???????????????潟?若????????с??????????????
?????????絖???????nil?????????????????c???????潟?若????c?潟?違????鴻???с??茘???????冴??????????????箴?紊??????冴?????眼??????????鴻??????????????障?????

???????
Hash[enum.map {|x| x > 0 ? [x, x*x] : nil }]
??????????????????????激?ャ??篏?????????????括?????nil鐚??????????????????????с??????篁紙????わ?????篏帥?c?????≪???????????鴻??????????????翫????с??????????????
????????????????????????罕??????????????腓冴????????????????с???????????罘????眼??????????????????????羂?????????障????????Hash[?????ф??膣√?純????????

Hash[enum.map {|x| x > 0 ? [x, x*x] : nil }.compat] # minimum change
Hash[enum.flat_map {|x| x > 0 ? [x, x*x] : [] }] # 1.9+ only
{}.tap { |h| enum.each {|x| x > 0 and h[x] = x*x } }

----------------------------------------
Bug #7300: Hash#[] ?????????? 1.9.3 ???違??c??????
https://bugs.ruby-lang.org/issues/7300#change-32547

Author: hsbt (Hiroshi SHIBATA)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-11-07) [x86_64-darwin12.2.0]


Hash[[nil]] ???絎?茵?????????? 1.9.3 ??с?? {} ???????????? 2.0.0 ??с?? ArgumentError ???????障?????

????????????????梧????????帥????????2.0.0 ??????????筝?罩c????????????с?????????罩???????????????
???????????????????????????????障???????????2.0.0 ??с?? dupricate ??茘?????????????????
罨<????若?鴻?ф??????????????鴻?????????????????????障?????


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