From 05f891cbbb4ee3b09e83e50924d96bddb8f67b91 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 8 Dec 2016 06:19:06 +0000 Subject: vm.c: check type of hash to merge * vm.c (core_hash_merge): check the type of the target hash to merge. [ruby-core:78536] [Bug #13015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index daa043d863..67a6e8e164 100644 --- a/vm.c +++ b/vm.c @@ -2600,6 +2600,7 @@ core_hash_merge(VALUE hash, long argc, const VALUE *argv) { long i; + Check_Type(hash, T_HASH); VM_ASSERT(argc % 2 == 0); for (i=0; i