I realized that the curly braces for a hash can be omitted if it is the last element in an array. For example, the forms:
[1, 2, 3, :a => 'A', :b => 'B']
[1, 2, 3, a: 'A', b: 'B']
seem to be identical to:
[1, 2, 3, {:a => 'A', :b => 'B'}]
[1, 2, 3, {a: 'A', b: 'B'}]
I knew this kind of omission is possible for arguments of a method, but had not noted it is possible for an array. Is my understanding of this rule correct? And, is this described somewhere?
This would seem to be a new feature of 1.9: