From: Josh Cheek Date: 2011-04-13T22:59:02+09:00 Subject: Re: colliding method names --bcaec547c993ed410404a0cd35c9 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 13, 2011 at 8:47 AM, Iain Barnett wrote: > Hi, > > If I'm running irb and I run a method called `foo`, is there a way to find > out which foo was called? I'm getting some strange results and wonder if > there's more than one method with the same name out there. > > Any help is much appreciated. > > Regards, > Iain > You can use #method begin method :foo # => rescue $! # => # end def foo end method :foo # => # def self.foo end method :foo # => # "hello world".instance_eval do method :foo # => # class String def foo end end method :foo # => # def self.foo end method :foo # => # end --bcaec547c993ed410404a0cd35c9--