From: savin max Date: 2011-04-25T12:10:35+09:00 Subject: Re: who can eplain deeply the ruby's methods? Stu wrote in post #994785: > > *.each example with a simple hash and multidimensional array : > >>> {one: 1, two:2}.each {|x,y| p x; p y} > :one > 1 > :two > 2 > => {:one=>1, :two=>2} > >>> [[:one,1],[:two,2]].each{|x,y| p x; p y} > :one > 1 > :two > 2 > => [[:one, 1], [:two, 2]] > > A better example would be to put both the array and hash into a > variable where one wouldn't even have to know what the variable data > type was but knew they could parse it without worry of implementation > details or test with a million + one conditionals to figure out how to > deal with the data. I have just read your questions at this place, i think you are a deep thinking person. thank you!~ -- Posted via http://www.ruby-forum.com/.