diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-28 02:41:05 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-28 02:41:05 +0000 |
commit | 70dc199fdde6a70205410e0a8cfe4aff4c50344f (patch) | |
tree | 2c7df57d1caf8d36bb9c9374a8730108017ceaa2 /hash.c | |
parent | 56201383cdf5ac4055d2eda136336624b4febde7 (diff) |
* hash.c (rb_hash_become): Hash#become should check added
self-assignment.
* class.c (rb_make_metaclass): metaclass of a superclass may be
NULL at boot time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -575,6 +575,7 @@ static VALUE rb_hash_become(hash, hash2) VALUE hash, hash2; { + if (hash == hash2) return hash; hash2 = to_hash(hash2); rb_hash_clear(hash); st_foreach(RHASH(hash2)->tbl, replace_i, hash); |