summaryrefslogtreecommitdiff
path: root/sample/blk.rb
blob: e11cc026ea820324ba958d7c989c7c28e026c444 (plain)
1
2
3
4
5
6
7
8
9
def foo()
  $block = Block.new
end

foo(){|i| print "i = ", i, "\n"}
$block.call(2)

foo(){|i| print "i*2 = ", i*2, "\n"}
$block.call(2)