Ruby Screenshot of the Week #34: Detecting Duplicates Hash Keys


You didn't think we had forgotten Ruby, did you? Here's a new Ruby editor feature: Detecting duplicate hashkeys. As "Fjan" (who filed the
request) says, when some Rails calls allow dozens or more keys, you can accidentally add a hash key twice, with subtle results. NetBeans now tracks these down and points them out for you.






This is going into 7.0, but you can use this 6.5-compatible module as well.



Martin and Erno have also been hard at work. There are many new features in 6.5 (which I'll cover when 6.5 ships in a week or two). But in the 7.0 trunk, the debugger can attach to arbitrary and remote processes - see
Martin's blog entry for more info. And Erno has added support for Shoulda testing and more test runner improvements - details here.

Comments:

Awesome. It's stuff like this why Netbeans now is my prefered way to work with Ruby.
The new Python stuff is also wonderful. Keep up the great work.

Posted by Markus Jais on November 12, 2008 at 04:21 PM PST #

Wow! Just Wow!
I put in a feature request before I went to bed and I wake up to find that there are change sets available for the current and new version. And a blog post to tell the world.
Talk about quick turnaround. Thanks for the excellent service.

Does this spot hash assignments it outside a function call as well?
cond={:c1 => 1, :c2 => 2, :c1 => 3}
Record.find(:all,cond)
I'm off to try it out.

Posted by Fjan (Jan M. Faber) on November 12, 2008 at 04:28 PM PST #

Post a Comment:
Comments are closed for this entry.
About

Tor Norbye

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today