diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | hash.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon Jul 29 21:53:41 2013 Masaki Matsushita <glass.saga@gmail.com> + + * hash.c (rb_hash_compare_by_id): don't call rb_hash_rehash() + if self.compare_by_identity? == true. + Mon Jul 29 21:29:48 2013 Masaki Matsushita <glass.saga@gmail.com> * hash.c (rb_hash_assoc): performance improvement by replacing @@ -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); |