summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/compile.c b/compile.c
index 3ad7192ca0..ebb58bba8d 100644
--- a/compile.c
+++ b/compile.c
@@ -2379,15 +2379,11 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
rb_ary_push(ary, node->nd_head->nd_lit);
node = node->nd_next;
}
- while (node && nd_type(node->nd_head) == NODE_LIT &&
- node->nd_next && nd_type(node->nd_next->nd_head) == NODE_LIT) {
- rb_ary_push(ary, node->nd_head->nd_lit);
- node = node->nd_next;
+ while (node && nd_type(node->nd_head) == NODE_LIT) {
rb_ary_push(ary, node->nd_head->nd_lit);
node = node->nd_next;
len++;
}
- assert(RARRAY_LEN(ary) % 2 == 0);
OBJ_FREEZE(ary);