Our Daily Method #9: String#+@
Geplaatst door Michiel de Mare vr, 15 feb 2008 08:00:00 GMT
It’s Friday so we’ll keep it short.
[String,Symbol].each{|c|c.class_eval {alias +@ to_sym}}
Is it a Symbol? Is it a String? Who gives a damn!
hash[+key]