 <p>I just did this in irb, and it works.</p> <pre><code>class Foo def foo end def self.bar end end f = Foo.new m1 = f.method(:foo) m1.source_location =&gt; ["(irb)", 2] Foo.method(:bar) m2 = Foo.method(:bar) m2.source_location =&gt; ["(irb)", 4] </code></pre>