From: Robert Klemme Date: 2006-08-12T15:50:13+09:00 Subject: Re: Simple question regarding hashes x1 wrote: > Yep.. Thanks alot. This some pretty neat stuff. :-) > > hash = { > "foo" => Proc.new { > x = [] > y = [] > hash = { > "x" => ["a", "b", "c"].each {|i| x << i}, > "y" => ["x", "y", "z"].each {|i| y << i} > } > }.call > } > puts hash['foo']["y"][1] > puts hash['foo']["x"][1] > >> ruby test1.rb > y > b >> Exit code: 0 This code looks completely useless to me. You end up with the same hash whatever you do since there is no parametrization to your code. Where is the point? Did I miss something? Kind regards robert