class Foo
def bar
:object_method
end
end
f = Foo.new
f.bar
# => :object_method
def f.bar
:object_metaclass_method
end
f.bar
# => :object_metaclass_method
class << f
remove_method(:bar)
end
f.bar
# => :object_method
Created
September 14, 2017 14:22
-
-
Save eprothro/3de2d22c4576359d06e5bd825a9df6ac to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment