Sometimes you may have an error in a method somewhere and you want to find out where it is defined. Here are two extremely helpful methods for finding out this information. Note these methods require Ruby 1.9+
"55".method(:to_i).source_location
"55".method(:to_i).owner
Related External Links: