On 24 Jul 2010, at 19:38, Jim Neath wrote:

> As Caius has mentioned in #nwrug, my last post only works in 1.9
> 
> On Sat, Jul 24, 2010 at 6:34 PM, Jim Neath <[email protected]> wrote:
>> [*:a..:c].inject({}){|h,e|h[e]=h.size+1;h}
>> 
>> I think thats that shortest I can manage. Mind you, I'm crap at golf :P
> 


And also, Range include's Enumerable already, so you don't need to wrap it in 
an array & splat either. :)

C
---
Caius Durling
[email protected]
+44 (0) 7960 268 100
http://caius.name/

-- 
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en.

Reply via email to