Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created April 27, 2009 18:11
Show Gist options
  • Save jasonroelofs/102626 to your computer and use it in GitHub Desktop.
Save jasonroelofs/102626 to your computer and use it in GitHub Desktop.
class A
def method_missing(*args)
puts "Missing in A"
end
end
class B < A
def method_missing(*args)
puts "Missing in B"
end
end
class C < B
def method_missing(*args)
puts "Missing in C"
super
end
end
a = A.new
b = B.new
c = C.new
a.no_method
#=> Missing in A
b.no_method
#=> Missing in B
c.no_method
#=> Missing in C
#=> Missing in B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment