summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-11-25 09:24:09 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-11-25 09:24:09 +0900
commit0d48a9786f9202f4890df53682117429b9350516 (patch)
tree1697f3afde842fd206bb1a1d15fdcbde45029bff /test
parentd77b25410880f0c79bd215c406ec44a9dac07769 (diff)
parent0b4017fd6918005475ace8f46d5279e18ef49eb6 (diff)
downloadmruby-0d48a9786f9202f4890df53682117429b9350516.tar.gz
mruby-0d48a9786f9202f4890df53682117429b9350516.zip
Merge branch 'bouk-empty-ternary'
Diffstat (limited to 'test')
-rw-r--r--test/t/codegen.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb
index f910d37fb..cb2e75f93 100644
--- a/test/t/codegen.rb
+++ b/test/t/codegen.rb
@@ -9,3 +9,7 @@ assert('peephole optimization does not eliminate move whose result is reused') d
method(&a &&= 0)
end
end
+
+assert('empty condition in ternary expression parses correctly') do
+ assert_equal(() ? 1 : 2, 2)
+end