Hi:

Recently I needed to modify an array.
The array was part of a hash element, so
it had to be modified in place.

#collect! would have been a great way to go,
but I did not need to modify the whole array.

For example

  a=%w{one two three}

  a.collect! { |i| i.upcase }

will modify the whole array.

  a[1..-1].collect! { |i| i.upcase } 

will modify the anonymous array created by a[1..-1],
but not a.

This could have been solved with #collect_with_index!
but AFAIK, this does not exist.

Is there another way to achieve this same affect?

Thanks

-- 
Jim Freeze
----------
Intolerance is the last defense of the insecure.