Skip to content

Instantly share code, notes, and snippets.

@igaiga
Created November 7, 2019 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igaiga/61051176c280313bc92c827dcc9b5dd5 to your computer and use it in GitHub Desktop.
Save igaiga/61051176c280313bc92c827dcc9b5dd5 to your computer and use it in GitHub Desktop.
class A
def foo
"A"
end
end
class B < A
def foo
"B" + super
end
end
class C < B
def foo
"C" + super
end
end
B.class_eval{ remove_method :foo }
p C.new.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment