Is there any difference between the `:key => “value”` and `key: “value”` hash notations?
Yes, there is a difference. These are legal: h = { :$in => array } h = { :’a.b’ => ‘c’ } h[:s] = 42 but these are not: h = { $in: array } h = { ‘a.b’: ‘c’ } # but this is okay in Ruby2.2+ h[s:] = 42 You can also use … Read more