summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2019-05-30 15:25:31 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2019-06-03 13:38:47 -0700
commit790a1b17902f7ccb5939b9e0314571079fc30bc8 (patch)
tree8d557d1ddfcee8c91918d617a6c0251985725646 /gc.c
parent2de3d92844058511debef2815a0402f892a5536a (diff)
object id is stable now for all objects, so we can let hash keys move
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index bb07d3f216..5a94ca0b89 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)
{
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;
}