vendredi 10 mars 2023

remove_possible_method not removing the method for a module

My_module.methods returns [:local_constants, :module_exec, :class_exec, :module_eval, :class_eval, :included_modules, :include?, :name, :ancestors, :instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods, :constants, :const_get, :const_set, :const_defined?, :class_variables, :remove_class_variable, :class_variable_get, :class_variable_set, :class_variable_defined?, :public_constant, :private_constant, :deprecate_constant, :singleton_class?, :public_method_defined?, :method_defined?, :protected_method_defined?, :private_method_defined?, :public_class_method, :private_class_method, :<, :>, :alias_method_chain, :alias_attribute, .......]

My_module.instance_methods returns [:test_module, test_func, ....]

So when i do My_module.remove_possible_method :test_module It doesn't remove it.

If I try to call My_module.test_module it is throwing this error:

 Exception: undefined method `get_portal_redis_key' for #<Module:0x00007fea9b946>

Aucun commentaire:

Enregistrer un commentaire