# $Id: super.rb,v 1.2 2003/12/30 06:11:02 yuya Exp $ class Foo def initialize(arg) p(:Foo) p(arg) end end class Bar < Foo def initialize(arg) p(:Bar) super(arg) end end Bar.new(:ok) # NodeDump V0.1.7 # # NODE_BLOCK: # NODE_NEWLINE: [super.rb:3] # NODE_CLASS: class 8965 (Foo) # NODE_SCOPE: # NODE_NEWLINE: [super.rb:4] # NODE_DEFN: method 2865 (initialize) # NODE_SCOPE: # NODE_BLOCK: # NODE_ARGS: count = 1 # additional default values: # NODE_NEWLINE: [super.rb:5] # NODE_FCALL: to function: 6753 (p) # Parameters: # NODE_ARRAY: size = 1 # NODE_LIT: Symbol: 8965 (Foo) # NODE_NEWLINE: [super.rb:6] # NODE_FCALL: to function: 6753 (p) # Parameters: # NODE_ARRAY: size = 1 # NODE_LVAR: LV 2 (arg) # NODE_NEWLINE: [super.rb:10] # NODE_CLASS: class 8981 (Bar) # Superclass: # NODE_CONST: 8965 (Foo) # NODE_SCOPE: # NODE_NEWLINE: [super.rb:11] # NODE_DEFN: method 2865 (initialize) # NODE_SCOPE: # NODE_BLOCK: # NODE_ARGS: count = 1 # additional default values: # NODE_NEWLINE: [super.rb:12] # NODE_FCALL: to function: 6753 (p) # Parameters: # NODE_ARRAY: size = 1 # NODE_LIT: Symbol: 8981 (Bar) # NODE_NEWLINE: [super.rb:13] # NODE_SUPER: # NODE_ARRAY: size = 1 # NODE_LVAR: LV 2 (arg) # NODE_NEWLINE: [super.rb:17] # NODE_CALL: to method: 3177 (new) # Receiver: # NODE_CONST: 8981 (Bar) # Parameters: # NODE_ARRAY: size = 1 # NODE_LIT: Symbol: 8985 (ok)