summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/codegen.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb
new file mode 100644
index 000000000..89ad94bae
--- /dev/null
+++ b/test/t/codegen.rb
@@ -0,0 +1,20 @@
+##
+# Codegen tests
+
+assert('codegen absorbs arguments to redo and retry if they are the argument of a call') do
+ assert_nothing_raised do
+ a=*"1", case nil
+ when 1
+ redo |
+ 1
+ end
+ end
+
+ assert_nothing_raised do
+ a=*"1", case nil
+ when 1
+ retry |
+ 1
+ end
+ end
+end