How to overwrite a method?

Hi,

The following file within rails
/activeresource/lib/active_resource/formats/xml_format.rb

Has the method
def extension
  "xml"
end

How can I overwrite this so that it returns PHP without editing any
core
file?

just reopen that class
class WhateverItIs
   def extension
     "php"
   end
end