From 4556a9ec654406c1be43a0b0b3bff99e4d0ed3c1 Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 29 Nov 2012 17:35:29 +0000 Subject: * 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 --- vm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index ccf21d7a35..44fbd26e19 100644 --- a/vm.c +++ b/vm.c @@ -1986,6 +1986,7 @@ m_core_hash_from_ary(VALUE self, VALUE ary) RUBY_DTRACE_HASH_CREATE(RARRAY_LEN(ary), rb_sourcefile(), rb_sourceline()); } + assert(RARRAY_LEN(ary) % 2 == 0); for (i=0; i