mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3319 from bouk/apost-splatt
Fix segfault when using result of rest assignment
This commit is contained in:
@@ -1061,7 +1061,9 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
|
||||
n++;
|
||||
}
|
||||
}
|
||||
push();
|
||||
if (!val) {
|
||||
push();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user