From: Brian Candler Date: 2003-06-05T03:14:43+09:00 Subject: Re: remove_method question On Thu, Jun 05, 2003 at 01:57:32AM +0900, Daniel Berger wrote: > Let's say I have a class: > > class Foo > attr_reader :val1, :val2 > def initialize > @val1 = "hello" > @val2 = "world" > end > end > > Then, let's say I have a subclass of Foo, and I want to remove the > "val1" method. How would I do it? Well there's always: class Bar def val1 raise NameError end end i.e. replace val1 an explicit 'I do not exist' method. Otherwise it will be inherited. Regards, Brian.