ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:102831] [Ruby master Bug#17719] Irregular evaluation order in hash literals
@ 2021-03-12 13:05 nobu
  2021-03-12 20:40 ` [ruby-core:102836] " xtkoba+ruby
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nobu @ 2021-03-12 13:05 UTC (permalink / raw)
  To: ruby-core

Issue #17719 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #17719: Irregular evaluation order in hash literals
https://bugs.ruby-lang.org/issues/17719

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
@mame pointed out an irregular evaluation order example.

```sh
$ 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?



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 13:05 [ruby-core:102831] [Ruby master Bug#17719] Irregular evaluation order in hash literals nobu
2021-03-12 20:40 ` [ruby-core:102836] " xtkoba+ruby
2021-07-15  6:22 ` [ruby-core:104611] " nobu
2021-10-14 22:55 ` [ruby-core:105636] " jeremyevans0 (Jeremy Evans)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).