There are three ways to find out where a method is defined in Ruby using IRB:
- using the
source_location
defined on the Method object - using the IRB
show_source
command - displaying information about an object using
ls
(for displaying the object but not the source file)