>>>>> "G" == Guy N Hurst <gnhurst / hurstlinks.com> writes:

G> irb(main):114:0> class String
G> irb(main):115:1>   if !defined? oldsize then alias oldsize size end
G> irb(main):116:1>   def size
G> irb(main):117:2>     print "new version:"
G> irb(main):118:2>     oldsize
G> irb(main):119:2>   end
G> irb(main):120:1> end

 gsub!(/(defined\?)\s+(\w+)/, 'method_\\1 :\\2') # :-)


Guy Decoux