summaryrefslogtreecommitdiff
path: root/sample/caller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/caller.rb')
-rw-r--r--sample/caller.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/sample/caller.rb b/sample/caller.rb
new file mode 100644
index 0000000..8988733
--- /dev/null
+++ b/sample/caller.rb
@@ -0,0 +1,15 @@
+def test
+ for i in 1..2
+ for j in 1..5
+ print(j, ": ", caller(j).join(':'), "\n")
+ end
+ end
+end
+
+def test2
+ print(1, ": ", caller(1).join(':'), "\n")
+ test()
+end
+
+test2()
+caller()