Paul Dugdale wrote: > What I was trying to find out is - is there any way of passing a > reference to the value to the 'each' block, rather than a copy of the > value. You always pass by reference, but you pass a reference to the object (a pointer if you will) not a reference to the variable. You can't have variable references in ruby. > I.e. some easy way of doing this: > hash.each { |k,v| v = my_value } v.replace my_value If v has a replace method > Without having to refer to the hash again in the block like this: > hash.each { |k,v| hash[k] = my_value } If your v object is immutable, you'll have to do the above, I'm afraid. HTH, Sebastian -- NP: Depeche Mode - Useless Jabber: sepp2k / jabber.org ICQ: 205544826