summaryrefslogtreecommitdiff
path: root/sample/t1.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/t1.rb')
-rw-r--r--sample/t1.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/sample/t1.rb b/sample/t1.rb
new file mode 100644
index 0000000..98d3b52
--- /dev/null
+++ b/sample/t1.rb
@@ -0,0 +1,20 @@
+def test(a1, *a2)
+ while 1
+ switch gets()
+ case nil
+ break
+ case /^-$/
+ print("-\n")
+ return
+ case /^-help/
+ print("-help\n")
+ break
+ end
+ end
+ print(a1, a2, "\n")
+end
+
+print($ARGV, "\n")
+print("in: ")
+test(1)
+print("end\n")