by klochner · 15y ago · 0 comments
Array({:foo=>1}).map{|h| h[:foo]}
TypeError: Symbol as array index
[{:foo=>1}].flatten.compact.map{|h| h[:foo]}
=> [1]Array's terrible friend Integer() implicitly crashed my app in production before, so found that interesting to know; not necessarily related to your talk though. :)