This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 153074

Summary: Detect incorrect hash assignments
Product: ruby Reporter: fjan11 <fjan11>
Component: HintsAssignee: Torbjorn Norbye <tor>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: 6.5 build of the extra hints module

Description fjan11 2008-11-12 21:18:53 UTC
It would be great if the Netbeans editor could highlight the following problem:
some_function(:a => 1, b=> 2, a => 3)

Of course, the last key value pair overwrites the first one. Rails has functions that accept options hashes 10 items long, and I have on several occasions made 
the mistake of including an option twice, leading to hard to track down bugs.
Comment 1 Torbjorn Norbye 2008-11-12 23:29:51 UTC
Great idea!

This should be trivial to implement with the hints infrastructure.
Comment 2 Torbjorn Norbye 2008-11-13 02:39:03 UTC
Fixed in changeset 5a1e61e6d1a5.  That's for 7.0. I'm attaching a 6.5 compatible version as well.

Comment 3 Torbjorn Norbye 2008-11-13 02:39:44 UTC
Created attachment 73712 [details]
6.5 build of the extra hints module