Subject: overwriting (for real) a class
From: "Christopher J. Bottaro" <cjbottaro gmail.com>
Date: Tue, 4 Mar 2008 04:23:29 +0900
How can completely overwrite a class (not extend it)? For example.
fileA.rb:
class MyClass
def foo
end
end
fileB.rb (executed after fileA.rb):
class MyClass
def bar
end
end
MyClass.new.foo # I want a no method exception here
Thanks for the help.