mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[ruby/stringio] Add a comment to explicit RUBY_FL_USER2 |
RUBY_FL_USER3
(https://github.com/ruby/stringio/pull/133)
This way when someone removes these flags from Ruby or update them,
they'll find this reference when greping.
Followup: https://github.com/ruby/stringio/pull/128
fad26ee14b
This commit is contained in:
parent
96b823a211
commit
9420fc8ad6
1 changed files with 2 additions and 0 deletions
|
@ -1868,6 +1868,8 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
|
|||
if (!NIL_P(ptr->string) && WRITABLE(self)
|
||||
#if (RUBY_API_VERSION_MAJOR == 3 && RUBY_API_VERSION_MINOR >= 4) || RUBY_API_VERSION_MAJOR >= 4
|
||||
// Do not attempt to modify chilled strings on Ruby 3.4+
|
||||
// RUBY_FL_USER2 == STR_CHILLED_LITERAL
|
||||
// RUBY_FL_USER3 == STR_CHILLED_SYMBOL_TO_S
|
||||
&& !FL_TEST_RAW(ptr->string, RUBY_FL_USER2 | RUBY_FL_USER3)
|
||||
#endif
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue