From: Russell Me Date: 2008-02-08T14:07:57+09:00 Subject: Re: info on block arguments You've all contributed a great deal of information and I'm glad to be receiving help versus "RTFM" comments. kitty_toys.sort_by { |toy| toy[:shape] }.each do |toy| puts "Blixy has a #{ toy[:shape] } made of #{ toy[:fabric] }" end So in this case (with the sort_by) I gather that a sorted array is being thrown into |toy|, and then for each item in |toy| it's key and value are printed out by the puts statement? does that about sum it up? is it for each item in the array (that is, getting the number 3) or somehow incrementing through? and with this... 3.times {|x| puts x } the output is 0,1,2 because... x is initially nil and a value of 1 is returned (by... what?) to .times? is that right? I see that everything uses block arguments differently, which is good to know. Anyway, I really do appreciate such a helpful group of folk. It's encouraging. Thanks for all your input! -- Posted via http://www.ruby-forum.com/.