Skip to content

Commit 93be578

Browse files
committed
Remove global symbol locks for rb_intern
1 parent 33a849e commit 93be578

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

symbol.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -881,10 +881,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
881881
VALUE str = rb_setup_fake_str(&fake_str, name, len, enc);
882882
OBJ_FREEZE(str);
883883

884-
VALUE sym;
885-
GLOBAL_SYMBOLS_LOCKING(symbols) {
886-
sym = sym_find_or_insert_static_symbol(symbols, str);
887-
}
884+
VALUE sym = sym_find_or_insert_static_symbol(&ruby_global_symbols, str);
888885
return rb_sym2id(sym);
889886
}
890887

@@ -904,10 +901,7 @@ rb_intern(const char *name)
904901
ID
905902
rb_intern_str(VALUE str)
906903
{
907-
VALUE sym;
908-
GLOBAL_SYMBOLS_LOCKING(symbols) {
909-
sym = sym_find_or_insert_static_symbol(symbols, str);
910-
}
904+
VALUE sym = sym_find_or_insert_static_symbol(&ruby_global_symbols, str);
911905
return SYM2ID(sym);
912906
}
913907

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy