mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove global symbol locks for rb_intern
This commit is contained in:
parent
33a849e385
commit
93be578691
1 changed files with 2 additions and 8 deletions
10
symbol.c
10
symbol.c
|
@ -881,10 +881,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
|
|||
VALUE str = rb_setup_fake_str(&fake_str, name, len, enc);
|
||||
OBJ_FREEZE(str);
|
||||
|
||||
VALUE sym;
|
||||
GLOBAL_SYMBOLS_LOCKING(symbols) {
|
||||
sym = sym_find_or_insert_static_symbol(symbols, str);
|
||||
}
|
||||
VALUE sym = sym_find_or_insert_static_symbol(&ruby_global_symbols, str);
|
||||
return rb_sym2id(sym);
|
||||
}
|
||||
|
||||
|
@ -904,10 +901,7 @@ rb_intern(const char *name)
|
|||
ID
|
||||
rb_intern_str(VALUE str)
|
||||
{
|
||||
VALUE sym;
|
||||
GLOBAL_SYMBOLS_LOCKING(symbols) {
|
||||
sym = sym_find_or_insert_static_symbol(symbols, str);
|
||||
}
|
||||
VALUE sym = sym_find_or_insert_static_symbol(&ruby_global_symbols, str);
|
||||
return SYM2ID(sym);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue