by wfarr · 15y ago · 0 comments
I'm confident it's commonly understood best practice (among many languages at that) to use an underscore (_) in lieu of spaces in such things.
I agree that the quirks themselves are odd, but the matter of using a key with a space in it really stood out.
:"Some Text" is a perfectly valid symbol.
ruby-1.9.2-p136 :001 > h = {:"Some Text" => 123} => {:"Some Text"=>123} ruby-1.9.2-p136 :002 > h[ "Some Text".to_sym ] => 123