summaryrefslogtreecommitdiffhomepage
path: root/test/t/codegen.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/codegen.rb')
-rw-r--r--test/t/codegen.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb
new file mode 100644
index 000000000..f910d37fb
--- /dev/null
+++ b/test/t/codegen.rb
@@ -0,0 +1,11 @@
+##
+# Codegen tests
+
+assert('peephole optimization does not eliminate move whose result is reused') do
+ assert_raise LocalJumpError do
+ def method
+ yield
+ end
+ method(&a &&= 0)
+ end
+end