diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2024-08-08 12:42:04 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2024-08-09 15:20:58 +0200 |
| commit | 2bd5dc47ac7527fa2cec98106959d318021ab135 (patch) | |
| tree | fe59b438a96f1837291528477d90242fbec2bd97 /string.c | |
| parent | af44af238befeed20cc2606ea2b440e16d341213 (diff) | |
string.c: str_capacity don't check for immediates
`STR_EMBED_P` uses `FL_TEST_RAW` meaning we already assume `str`
isn't an immediate, so we can use `FL_TEST_RAW` here too.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11350
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -880,7 +880,7 @@ str_capacity(VALUE str, const int termlen) if (STR_EMBED_P(str)) { return str_embed_capa(str) - termlen; } - else if (FL_TEST(str, STR_SHARED|STR_NOFREE)) { + else if (FL_ANY_RAW(str, STR_SHARED|STR_NOFREE)) { return RSTRING(str)->len; } else { |
