Project

General

Profile

Bug #11327

Improve duplicate key warning.

Added by superdealloc (Andre Medeiros) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
[ruby-core:69860]

Description

This change rephrases the duplicate key warning, which causes some confusion.

Before:

/Users/andre/bug.rb:4: warning: duplicated key at line 5 ignored: :max_instances

After:

/Users/andre/bug.rb:4: warning: key :max_instances is duplicated and overwritten on line 5

Files

message_fix.diff (647 Bytes) message_fix.diff superdealloc (Andre Medeiros), 07/03/2015 07:29 PM

Related issues

Has duplicate Ruby master - Feature #11568: Misleading warning for duplicate keys in a hashClosedActions

Updated by zzak (Zachary Scott) over 4 years ago

If matz will approve, and no objection, I will commit it.

#3

Updated by zzak (Zachary Scott) over 4 years ago

  • Status changed from Open to Closed

Applied in changeset r51196.


#4

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Has duplicate Feature #11568: Misleading warning for duplicate keys in a hash added

Also available in: Atom PDF