From: Sean O'Halpin Date: 2006-07-19T10:05:44+09:00 Subject: Re: local methods and local instance variables [was super's not so super today] On 7/18/06, Trans wrote: > > On a side note I think I found a bug in Ruby, maybe > > class X > def self.method_added(name) > p name > end > end > > class X > def x; end > end > => :x > > class << X > undef_method :method_added > end > > class X > def y; end > end > => NoMethodError: undefined method `method_added' for X:Class > > > > > Is it a bug? You are undef'ing it after all. remove_method would seem more appropriate in this use case. But maybe a warning like "undefining `method_added' may cause serious problem" like for __send__, __id__, etc. might be in order. Regards, Sean