From ae23000c0e0e4f4af1b4462147d950549b3abdbe Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 19 Aug 2002 05:56:09 +0000 Subject: * array.c (sort_2): *a - *b may overflow. * array.c (ary_new): len*sizeof(VALUE) may be a positive value. * array.c (rb_ary_initialize): ditto. * object.c (rb_class_allocate_instance): move singleton class check from rb_obj_alloc(). * re.c (rb_reg_initialize): should not modify frozen Regexp. * ext/tcltklib/tcltklib.c (ip_init): allocation framework. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index dc7483b771..c332f554c7 100644 --- a/hash.c +++ b/hash.c @@ -611,6 +611,9 @@ rb_hash_replace(hash, hash2) if (FL_TEST(hash2, HASH_PROC_DEFAULT)) { FL_SET(hash, HASH_PROC_DEFAULT); } + else { + FL_UNSET(hash, HASH_PROC_DEFAULT); + } return hash; } -- cgit v1.2.3