diff options
author | Peter Zhu <[email protected]> | 2023-08-17 15:52:14 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-08-18 09:24:45 -0400 |
commit | 724223b4ca0117306529c9cbcfaedc3a07b840bf (patch) | |
tree | 0cf6d954f1e0b79a38b6acc88b17639ea76b4081 /string.c | |
parent | 2800d1fd370e267d4379a4029a7d6e799387cd97 (diff) |
Don't check for STR_NOEMBED in rb_fstring
We don't need to check for STR_NOEMBED because the check above for
STR_EMBED_P means that it can never be false.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8238
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -421,7 +421,8 @@ rb_fstring(VALUE str) OBJ_FREEZE_RAW(str); return str; } - if (FL_TEST_RAW(str, STR_NOEMBED|STR_SHARED_ROOT|STR_SHARED) == (STR_NOEMBED|STR_SHARED_ROOT)) { + + if (FL_TEST_RAW(str, STR_SHARED_ROOT | STR_SHARED) == STR_SHARED_ROOT) { assert(OBJ_FROZEN(str)); return str; } |