diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-29 17:35:29 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-29 17:35:29 +0000 |
commit | 4556a9ec654406c1be43a0b0b3bff99e4d0ed3c1 (patch) | |
tree | fcc84fd71b35e57a2ca7e4c4aab74458bbdc21d2 /compile.c | |
parent | 0e0a8244c3c931129c81b8ff658073c0742b10cb (diff) | |
download | ruby-4556a9ec654406c1be43a0b0b3bff99e4d0ed3c1.tar.gz |
* compile.c (compile_array_): refix r37991 remove assertion:
it is true only if type == COMPILE_ARRAY_TYPE_HASH.
[ruby-dev:46658] [Bug #7466]
* vm.c (m_core_hash_from_ary): add assertion instead of above.
* vm.c (m_core_hash_merge_ary): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2379,7 +2379,10 @@ 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) { + 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; rb_ary_push(ary, node->nd_head->nd_lit); node = node->nd_next; len++; |