Skip to content

Commit

Permalink
Allow symbols used for scopes to move
Browse files Browse the repository at this point in the history
This commit allows symbols used for instance variables, global variables,
constants, class names to be moved by GC compaction.
  • Loading branch information
peterzhu2118 committed Apr 16, 2024
1 parent 1984f9a commit 0efd2fe
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9473,10 +9473,6 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
case T_ZOMBIE:
return FALSE;
case T_SYMBOL:
if (DYNAMIC_SYM_P(obj) && (RSYMBOL(obj)->id & ~ID_SCOPE_MASK)) {
return FALSE;
}
/* fall through */
case T_STRING:
case T_OBJECT:
case T_FLOAT:
Expand Down

0 comments on commit 0efd2fe

Please sign in to comment.