2010/3/26 Derek Cannon <novellterminator / gmail.com>:
> After playing around some more, I've found a solution.
>
> For anyone who is interested, the following code works:
>
> class Array
>  ¨Âåæ çóõ⡨ðáôôåòî¬ òåðìáãåíåîô©
>  ¨Âáãüø>  ¨Â®çóõ⡨ðáôôåòîòåðìáãåíåîô©
>  ¨Â
>  ¨Âîä
> end

What is the benefit of doing

arr.gsub! /foo/, 'bar'

over

arr.each {|s| s.gsub! /foo/, 'bar'}

?  Frankly I'd rather use the latter form.  Because otherwise you'll
have to put a method in Array (or Enumerable for that matter) for
*every* operation you want to apply to elements.  Additionally, there
is another point: since you made Array#gsub! look like String#gsub!
this might confuse readers of the code - especially if someone picks
bad variable names like "a".

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/