summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 91a28ee569..70b6bd4ac9 100644
--- a/hash.c
+++ b/hash.c
@@ -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);