P
Pat Maddox
irb(main):001:0> class Foo
irb(main):002:1> alias_method ld_remove_method, :remove_method
irb(main):003:1> end
NameError: undefined method `remove_method' for class `Foo'
from (irb):2:in `alias_method'
from (irb):2
But you can call remove_method from within the class, so why can't you
alias it? What other methods can't you alias? Or rather, what are the
restrictions/conditions under which you must use alias_method?
irb(main):002:1> alias_method ld_remove_method, :remove_method
irb(main):003:1> end
NameError: undefined method `remove_method' for class `Foo'
from (irb):2:in `alias_method'
from (irb):2
But you can call remove_method from within the class, so why can't you
alias it? What other methods can't you alias? Or rather, what are the
restrictions/conditions under which you must use alias_method?