[ruby/json] Use rb_str_new_frozen
https://github.com/ruby/json/commit/90c8aaaa6a
This commit is contained in:
parent
ed22e68379
commit
2f84a02ad5
Notes:
git
2024-11-05 17:00:59 +00:00
@ -1113,7 +1113,7 @@ static VALUE string_config(VALUE config)
|
||||
if (RTEST(config)) {
|
||||
Check_Type(config, T_STRING);
|
||||
if (RSTRING_LEN(config)) {
|
||||
return RB_OBJ_FROZEN(config) ? config : rb_str_freeze(rb_str_dup(config));
|
||||
return rb_str_new_frozen(config);
|
||||
}
|
||||
}
|
||||
return Qfalse;
|
||||
|
Loading…
x
Reference in New Issue
Block a user