diff options
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3708,7 +3708,7 @@ compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const NODE *rhsn = node->nd_value; const NODE *splatn = node->nd_args; const NODE *lhsn = node->nd_head; - int lhs_splat = (splatn && (VALUE)splatn != (VALUE)-1) ? 1 : 0; + int lhs_splat = (splatn && splatn != NODE_SPECIAL_NO_NAME_REST) ? 1 : 0; if (!popped || splatn || !compile_massign_opt(iseq, ret, rhsn, lhsn)) { int llen = 0; @@ -3765,12 +3765,12 @@ compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const NODE *postn = splatn->nd_2nd; const NODE *restn = splatn->nd_1st; int num = (int)postn->nd_alen; - int flag = 0x02 | (((VALUE)restn == (VALUE)-1) ? 0x00 : 0x01); + int flag = 0x02 | ((restn == NODE_SPECIAL_NO_NAME_REST) ? 0x00 : 0x01); ADD_INSN2(ret, nd_line(splatn), expandarray, INT2FIX(num), INT2FIX(flag)); - if ((VALUE)restn != (VALUE)-1) { + if (restn != NODE_SPECIAL_NO_NAME_REST) { CHECK(compile_massign_lhs(iseq, ret, restn)); } while (postn) { |