summaryrefslogtreecommitdiff
path: root/sample/blk.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/blk.rb')
-rw-r--r--sample/blk.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/sample/blk.rb b/sample/blk.rb
new file mode 100644
index 0000000000..4e618bce2d
--- /dev/null
+++ b/sample/blk.rb
@@ -0,0 +1,9 @@
+def foo()
+ $block = Block.new
+end
+
+foo(){i | print "i = ", i, "\n"}
+$block.do(2)
+
+foo(){i | print "i*2 = ", i*2, "\n"}
+$block.do(2)