ruby-changes:55981
From: Aaron <ko1@a...>
Date: Tue, 4 Jun 2019 05:39:24 +0900 (JST)
Subject: [ruby-changes:55981] Aaron Patterson: 790a1b1790 (trunk): object id is stable now for all objects, so we can let hash keys move
https://git.ruby-lang.org/ruby.git/commit/?id=790a1b1790 From 790a1b17902f7ccb5939b9e0314571079fc30bc8 Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Thu, 30 May 2019 15:25:31 -0700 Subject: object id is stable now for all objects, so we can let hash keys move diff --git a/gc.c b/gc.c index bb07d3f..5a94ca0 100644 --- a/gc.c +++ b/gc.c @@ -4542,12 +4542,7 @@ mark_keyvalue(st_data_t key, st_data_t value, st_data_t data) https://github.com/ruby/ruby/blob/trunk/gc.c#L4542 { rb_objspace_t *objspace = (rb_objspace_t *)data; - if (SPECIAL_CONST_P((VALUE)key) || BUILTIN_TYPE((VALUE)key) == T_STRING) { - gc_mark(objspace, (VALUE)key); - } - else { - gc_mark_and_pin(objspace, (VALUE)key); - } + gc_mark(objspace, (VALUE)key); gc_mark(objspace, (VALUE)value); return ST_CONTINUE; } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/