You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#instance_methods in 1.8 returns strings, not symbols. Most recommend
using method_defined? instead of #instance_methods.include?, however,
#method_defined? doesn't allow filtering of inherited methods.
So, we switch back to using #method_defined? which means we need to
handle the 'method not defined on class' error another way...
Use #undef_method in place of #remove_method which will undefine
inherited methods as well. This is what we should have done all along.
The parent class method is still defined as expected. #undef_method only
hides that implementation from the subclass so it doesn't attempt to
defer to the parent class. This allows a safe #define_method on the
subclass.
0 commit comments