diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-29 12:57:40 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-29 12:57:40 +0000 |
commit | cff03715fff4e3fd9255afc41b6d3fa8c7d72089 (patch) | |
tree | 40455cc08dbd25275873f152169dd1df15cef7b1 /hash.c | |
parent | eb8f91866e0bd08a6eef9c9a2bc1318e06b4ee4d (diff) | |
download | ruby-cff03715fff4e3fd9255afc41b6d3fa8c7d72089.tar.gz |
* hash.c (rb_hash_compare_by_id): don't call rb_hash_rehash()
if self.compare_by_identity? == true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2307,6 +2307,7 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash) static VALUE rb_hash_compare_by_id(VALUE hash) { + if (rb_hash_compare_by_id_p(hash)) return hash; rb_hash_modify(hash); RHASH(hash)->ntbl->type = &identhash; rb_hash_rehash(hash); |