Commit 4229b41c authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1421 from carsonmcdonald/fixfor1419

Remove pop that was done when not a return val
parents cd199210 2eb2cdf0
......@@ -1551,7 +1551,6 @@ codegen(codegen_scope *s, node *tree, int val)
// variable rhs
codegen(s, t, VAL);
gen_vmassignment(s, tree->car, rhs, val);
if (!val) pop();
}
}
break;
......
......@@ -65,3 +65,12 @@ assert('Abbreviated variable assignment as returns') do
end
assert_equal Syntax4AbbrVarAsgnAsReturns::A.new.b, 1
end
assert('Splat and mass assignment') do
*a = *[1,2,3]
b, *c = *[7,8,9]
assert_equal [1,2,3], a
assert_equal 7, b
assert_equal [8,9], c
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment