Merge pull request #3319 from bouk/apost-splatt

Fix segfault when using result of rest assignment
This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-12-03 12:53:21 +09:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
+3 -1
View File
@@ -1061,7 +1061,9 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
n++;
}
}
push();
if (!val) {
push();
}
}
}
+9
View File
@@ -54,3 +54,12 @@ A
B
assert_equal "\n", a
end
assert('splat in case splat') do
a = *case
when 0
* = 1
end
assert_equal [1], a
end