summaryrefslogtreecommitdiffhomepage
path: root/test/t/codegen.rb
diff options
context:
space:
mode:
authorBouke van der Bijl <[email protected]>2016-11-24 13:31:47 -0500
committerBouke van der Bijl <[email protected]>2016-12-01 15:49:36 -0500
commitfe362c1f2649c9c502d9a5998ef8c4c94893f3ea (patch)
tree295ff985f5e13c821398ae0f784122a279a67aeb /test/t/codegen.rb
parent2cca9d368815e9c83a7489c40d69937d68cb43a2 (diff)
downloadmruby-fe362c1f2649c9c502d9a5998ef8c4c94893f3ea.tar.gz
mruby-fe362c1f2649c9c502d9a5998ef8c4c94893f3ea.zip
Fix segfault when using result of rest assignment
Reported by https://hackerone.com/haquaman
Diffstat (limited to 'test/t/codegen.rb')
-rw-r--r--test/t/codegen.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb
index 1ac689a82..bb0f5c306 100644
--- a/test/t/codegen.rb
+++ b/test/t/codegen.rb
@@ -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