From: "David A. Black" Date: 2005-02-27T18:45:24+09:00 Subject: Re: Can I remove methods from a single object, but not its class? Hi -- On Sun, 27 Feb 2005, Sam Roberts wrote: > I want to allow method calls during initialization, but not after: > > class Foo > attr_writer :opt > def initialize > yield self > > # doesn't work > remove_method 'opt=' > > # doesn't work > class < self > remove_method 'opt=' > end Try: class << self undef_method 'opt=' end David -- David A. Black dblack@wobblini.net