What is the difference between Module#remove_method and Module#undef_method?

Technology CommunityCategory: RubyWhat is the difference between Module#remove_method and Module#undef_method?
VietMX Staff asked 3 years ago

Module#undef_method prevents any invocation of the method through an instance of the class, while Module#remove_method will remove the method definition from the class, but not prevent inherited methods of the same name from being invoked.