The other day I learned that Ruby 1.9 has a source_location method. At last, we can find out where methods and procs come from! What about modules and classes? Well their open nature means they aren’t strictly speaking defined in one place. But that shouldn’t stop us. Finding a primary location is only a matter of looking carefully.
As a bonus, let’s have TextMate jump right to the location.
Commentary