# $Id: block_pass.rb,v 1.2 2003/12/30 06:11:01 yuya Exp $ def foo(&block) bar(&block) end def bar(&block) block.call end foo { puts 'ok' } # NodeDump V0.1.7 # # NODE_BLOCK: # NODE_NEWLINE: [block_pass.rb:3] # NODE_DEFN: method 8961 (foo) # NODE_SCOPE: # NODE_BLOCK: # NODE_ARGS: count = 0 # additional default values: # NODE_BLOCK_ARG: (to LV 2 (block)) # NODE_NEWLINE: [block_pass.rb:4] # NODE_BLOCK_PASS: # NODE_LVAR: LV 2 (block) # NODE_FCALL: to function: 8977 (bar) # NODE_NEWLINE: [block_pass.rb:7] # NODE_DEFN: method 8977 (bar) # NODE_SCOPE: # NODE_BLOCK: # NODE_ARGS: count = 0 # additional default values: # NODE_BLOCK_ARG: (to LV 2 (block)) # NODE_NEWLINE: [block_pass.rb:8] # NODE_CALL: to method: 5753 (call) # Receiver: # NODE_LVAR: LV 2 (block) # NODE_NEWLINE: [block_pass.rb:12] # NODE_ITER: # Iterator: # NODE_FCALL: to function: 8961 (foo) # Into: # NODE_NEWLINE: [block_pass.rb:12] # NODE_FCALL: to function: 6713 (puts) # Parameters: # NODE_ARRAY: size = 1 # NODE_STR: "ok"