From: Aldric Giacomoni Date: 2010-04-01T21:08:50+09:00 Subject: Re: Weird hash key: what am I asking Ruby to do? Josh Cheek wrote: > On Wed, Mar 31, 2010 at 12:32 PM, Aldric Giacomoni > wrote: >> >> So.. In the first example, the hash key is 'lambda { x } => 5' . >> What on earth does that even mean? >> >> > It means that the key is a hash table which contains a key of the > lambda, > that maps to the value of 5. Notice all three sets of code are the same, > the > keys just get progressively more complicated looking. But if you didn't > know > what they were, and just considered them to be an object (which they > are), > then they are no longer so complicated, just complicated looking. > Hah! That makes perfect sense. I know what I'm doing next time I see a code obfuscation contest. Thanks! -- Posted via http://www.ruby-forum.com/.