Project

General

Profile

Feature #11568

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

When a hash literal has duplicate keys as follows, 

 ~~~ruby ~~~ 
 { 
   a: "foo", 
   a: "bar", 
 } 

 ~~~ 

 the warning message goes as follows: 

 ~~~ 
 warning: duplicated key at line 3 ignored: :a 
 ~~~ 

 This message gives the impression as if it is the value `"bar"` at line 3 that is ignored, even though in reality it is the value `"foo"` at line 2 that is ignored. It is misleading. I suggest the message to be changed.

Back