jameskilton (owner)

Revisions

gist: 102626 Download_button fork
public
Public Clone URL: git://gist.github.com/102626.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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