def get_mname
  caller[0]=~/`(.*?)'/  # note the first quote is a backtick
  $1
end

def dinosaur
  puts get_mname
  puts method(get_mname).owner
end

dinosaur

--output:--
dinosaur
Object

-- 
Posted via http://www.ruby-forum.com/.