Skip to content

Commit f8976b6

Browse files
committed
Add a comment to explicit RUBY_FL_USER2 | RUBY_FL_USER3
This way when someone removes these flags from Ruby or update them, they'll find this reference when greping.
1 parent a27c5d5 commit f8976b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/stringio/stringio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,8 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
18681868
if (!NIL_P(ptr->string) && WRITABLE(self)
18691869
#if (RUBY_API_VERSION_MAJOR == 3 && RUBY_API_VERSION_MINOR >= 4) || RUBY_API_VERSION_MAJOR >= 4
18701870
// Do not attempt to modify chilled strings on Ruby 3.4+
1871+
// RUBY_FL_USER2 == STR_CHILLED_LITERAL
1872+
// RUBY_FL_USER3 == STR_CHILLED_SYMBOL_TO_S
18711873
&& !FL_TEST_RAW(ptr->string, RUBY_FL_USER2 | RUBY_FL_USER3)
18721874
#endif
18731875
) {

0 commit comments

Comments
 (0)