From: Aldric Giacomoni Date: 2010-04-01T03:32:05+09:00 Subject: Weird hash key: what am I asking Ruby to do? I decided to type the following in irb: irb(main):010:0> a = {} => {} irb(main):015:0> a[lambda { x } => 5] = 5 => 5 irb(main):016:0> a => {{#=>5}=>5} irb(main):017:0> a = {} => {} irb(main):018:0> a[lambda { x } ] = 5 => 5 irb(main):019:0> a => {#=>5} So.. In the first example, the hash key is 'lambda { x } => 5' . What on earth does that even mean? In the second one, the hash key is a lambda. Does that even serve any purpose beyond just being the key for whatever value I choose to associate with it? -- Posted via http://www.ruby-forum.com/.