# $Id: op_asgn2.rb,v 1.2 2003/12/30 06:11:02 yuya Exp $ class Foo def initialize(val) @val = val end attr_accessor :val end p(Foo.new(2).val |= 1) # NodeDump V0.1.7 # # NODE_BLOCK: # NODE_NEWLINE: [op_asgn2.rb:3] # NODE_CLASS: class 8965 (Foo) # NODE_SCOPE: # NODE_BLOCK: # NODE_NEWLINE: [op_asgn2.rb:4] # NODE_DEFN: method 2865 (initialize) # NODE_SCOPE: # NODE_BLOCK: # NODE_ARGS: count = 1 # additional default values: # NODE_NEWLINE: [op_asgn2.rb:5] # NODE_IASGN: # NODE_LVAR: LV 2 (val) # Assign to IV 8978 (@val) # NODE_NEWLINE: [op_asgn2.rb:7] # NODE_FCALL: to function: 3265 (attr_accessor) # Parameters: # NODE_ARRAY: size = 1 # NODE_LIT: Symbol: 8969 (val) # NODE_NEWLINE: [op_asgn2.rb:10] # NODE_FCALL: to function: 6753 (p) # Parameters: # NODE_ARRAY: size = 1 # NODE_OP_ASGN2: to method: 8969 (val) # Receiver: # NODE_CALL: to method: 3177 (new) # Receiver: # NODE_CONST: 8965 (Foo) # Parameters: # NODE_ARRAY: size = 1 # NODE_LIT: Fixnum: 2 # using: 124 (|) # NODE_LIT: Fixnum: 1