Actions
Bug #17719
closedIrregular evaluation order in hash literals
Description
@mame (Yusuke Endoh) pointed out an irregular evaluation order example.
$ ruby -e '{foo:p(1), bar:p(2), foo:p(3)}'
-e:1: warning: key :foo is duplicated and overwritten on line 1
1
3
2
It feels like a bug.
https://github.com/nobu/ruby/tree/duplicated-keys-order
Or, probably it would be better to turn into an error?
Actions
Like0
Like0Like0Like0Like0