I'm sorry about the nonexistant explanation.
In this situation, the only solution that I know of is to use an eval.
def custom_remove_method(object, symbol)
remove_method_script = %-
class << object
remove_method(:#{symbol.to_s})
end
-
eval remove_method_script
end
> Looking at eval.c, it looks like it just deletes the method from the class' method table.
Can this be done in Ruby?
Thank you,
Brian Takita