diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-10-16 10:33:30 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-10-16 10:33:35 +0900 |
| commit | 0dc5fcec7be22cb84c4bd537dd140f97c10b7b48 (patch) | |
| tree | a3d3afa2f77f5b26ec2b4a3908647f713740b0da /mrbgems/mruby-compiler/core/parse.y | |
| parent | 0b095406bf52589e57dc9e7211f981e0a79f7f64 (diff) | |
| download | mruby-0dc5fcec7be22cb84c4bd537dd140f97c10b7b48.tar.gz mruby-0dc5fcec7be22cb84c4bd537dd140f97c10b7b48.zip | |
parse.y: check `car` part of return node.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 42fc94687..c1f888047 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -1274,6 +1274,7 @@ ret_args(parser_state *p, node *n) yyerror(p, "block argument should not be given"); return NULL; } + if (!n->car) return NULL; if (!n->car->cdr) return n->car->car; return new_array(p, n->car); } |
