diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-28 04:21:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-28 04:21:31 +0000 |
commit | 4d23d9e7d8bda4f1231b5696a714fee735cdad90 (patch) | |
tree | 494addc0fd35877a3d10f9ef20862865b1a175e4 /hash.c | |
parent | 70dc199fdde6a70205410e0a8cfe4aff4c50344f (diff) | |
download | ruby-4d23d9e7d8bda4f1231b5696a714fee735cdad90.tar.gz |
* hash.c (rb_hash_become): should check self-assignment after
conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -575,8 +575,8 @@ static VALUE rb_hash_become(hash, hash2) VALUE hash, hash2; { - if (hash == hash2) return hash; hash2 = to_hash(hash2); + if (hash == hash2) return hash; rb_hash_clear(hash); st_foreach(RHASH(hash2)->tbl, replace_i, hash); RHASH(hash)->ifnone = RHASH(hash2)->ifnone; |