I’m trying to alias a method in a module and then overwriting this
method (still having access to the old method).
I tried the following code that does not seem to work with Ruby 1.9.2.
Do you have an idea why?
alias_method :old_foo, :foo #unless method_defined?(:old_foo)
A.send :include, Foo
a = A.new
a.foo #=> bar