From: David Alan Black Date: 2001-09-05T20:19:50+09:00 Subject: [ruby-talk:20916] Re: Removing singleton methods and instance variables - how ? Hello -- On Wed, 5 Sep 2001, Aristarkh A Zagorodnikov wrote: > begin code sample (test.rb) >>>> > module Test > def Test.test > @instance_variable = 'test' > end > > def Test.test_variable > remove_instance_variable '@instance_variable' > end > > def Test.test_method > remove_method :test > end > end Try changing that last one to: def Test.test_method class << self remove_method :test end end Also, beware of using 'test' as a name for testing methods in Ruby. I speak from experience :-) David -- David Alan Black, dblack@candle.superlink.net ** Register for RubyConf 2001! ** http://www.rubyconf.com/regform.php ** Time is short.. we need to reach our sign-up quota by Sep. 11.