Henrik wrote:

> Nor can I do (assuming another alias_method):
> 
> 	def upcase!
> 	  self.old_upcase!
> 	  self.tr!("", "")
> 	end
> 
> or the same thing chained (self.old_upcase!.tr!(...)), because that only 
> returns nil.

I'd do it like this: (Ignoring the more obvious replace solution)

class String
   alias :old_upcase! :upcase!
   def upcase!()
     old_upcase!
     tr!("", "")
   end

   def upcase()
     result = self.clone
     result.upcase!
     return result
   end
end

-- 
http://flgr.0x42.net/