summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorcremno <[email protected]>2015-05-07 16:58:43 +0200
committercremno <[email protected]>2015-05-07 16:58:43 +0200
commit2aa59393bafa24421ff6c5b90de59af8a25f927c (patch)
tree28688fbb165a73c4f8371cd79dfccac842f48eab /src
parent2fe556d9c039839c20965a2c90dff703f04e40ec (diff)
downloadmruby-2aa59393bafa24421ff6c5b90de59af8a25f927c.tar.gz
mruby-2aa59393bafa24421ff6c5b90de59af8a25f927c.zip
fix splat without assignment; fix #2781
The parser generates NODE_NIL for tSTAR without argument in masgns. The codegen didn't handle that.
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codegen.c b/src/codegen.c
index c8f964f56..16e1235de 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -964,6 +964,9 @@ gen_assignment(codegen_scope *s, node *tree, int sp, int val)
genop_peep(s, MKOP_AB(OP_MOVE, cursp(), sp), val);
}
break;
+ /* splat without assignment */
+ case NODE_NIL:
+ break;
default:
#ifdef ENABLE_STDIO