# $Id: block_arg.rb,v 1.2 2003/12/30 06:11:01 yuya Exp $ def foo(&block) block.call end foo { p('ok') } # NodeDump V0.1.7 # # NODE_BLOCK: # NODE_NEWLINE: [block_arg.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_arg.rb:4] # NODE_CALL: to method: 5753 (call) # Receiver: # NODE_LVAR: LV 2 (block) # NODE_NEWLINE: [block_arg.rb:8] # NODE_ITER: # Iterator: # NODE_FCALL: to function: 8961 (foo) # Into: # NODE_NEWLINE: [block_arg.rb:8] # NODE_FCALL: to function: 6753 (p) # Parameters: # NODE_ARRAY: size = 1 # NODE_STR: "ok"