diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index c36178c8b0..3996824a2f 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -1644,14 +1644,13 @@ gen_hash(codegen_scope *s, node *tree, int val, int limit) } } if (update) { - if (len > 0) { + if (val && len > 0) { pop_n(len*2+1); genop_2(s, OP_HASHADD, cursp(), len); push(); } return -1; /* variable length */ } - if (update) return -1; return len; }