What is the difference between these examples?
a = {'a' : 'b'}
a = {'a' => 'b'}
What is the difference between these examples?
a = {'a' : 'b'}
a = {'a' => 'b'}
The first one is wrong, and gives you a syntax error. With the second syntax, you can use a key of any class. Otherwise, this syntax is just a shortcut for a symbol key.
a = {a: 'b'}
is equivalent to:
a = {:a => 'b'}