Sha256: 9b8f6237ce343b582bae9152d885dfd4ce7d8094e5af76015b2afb86410448b3
Contents?: true
Size: 457 Bytes
Versions: 9
Compression:
Stored size: 457 Bytes
Contents
# copied from activesupport/core_ext from Rails, MIT license # https://github.com/rails/rails/tree/5aa869861c192daceafe3a3ee50eb93f5a2b7bd2/activesupport/lib/active_support/core_ext class Module def remove_possible_method(method) if method_defined?(method) || private_method_defined?(method) undef_method(method) end end def redefine_method(method, &block) remove_possible_method(method) define_method(method, &block) end end
Version data entries
9 entries across 9 versions & 2 rubygems