Possible Duplicate:
When monkey patching a method, can you call the overridden method from the new implementation?
So I wish to simply add some conditional checks to a method by overriding it, but then I want the original method to be called. How does one do this in ruby?
ie.
method exists
def fakeMethod(cmd) puts "#{cmd}" end and I want to add
if (cmd) == "bla" puts "caught cmd" else fakeMethod(cmd) end Any ideas?