Permalink
Browse files

resolve conflict; ref #3286

  • Loading branch information...
matz committed Nov 25, 2016
2 parents d77b254 + 71641bb commit 0b4017fd6918005475ace8f46d5279e18ef49eb6
Showing with 8 additions and 0 deletions.
  1. +4 −0 mrbgems/mruby-compiler/core/codegen.c
  2. +4 −0 test/t/codegen.rb
@@ -1362,6 +1362,10 @@ codegen(codegen_scope *s, node *tree, int val)
int pos1, pos2;
node *e = tree->cdr->cdr->car;
if (!tree->car) {
codegen(s, e, val);
return;
}
switch ((intptr_t)tree->car->car) {
case NODE_TRUE:
case NODE_INT:
View
@@ -9,3 +9,7 @@ def method
method(&a &&= 0)
end
end
assert('empty condition in ternary expression parses correctly') do
assert_equal(() ? 1 : 2, 2)
end

0 comments on commit 0b4017f

Please sign in to comment.