Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ STRINGIO_VERSION = "3.2.1";
static inline bool
str_chilled_p(VALUE str)
{
#if (RUBY_API_VERSION_MAJOR == 3 && RUBY_API_VERSION_MINOR >= 4) || RUBY_API_VERSION_MAJOR >= 4
#if RUBY_API_VERSION_CODE >= 40100
// Do not attempt to modify chilled strings on Ruby 4.1+
// RUBY_FL_USER2 == STR_CHILLED
return FL_TEST_RAW(str, RUBY_FL_USER2);
#elif RUBY_API_VERSION_CODE >= 30400
// 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
Expand Down
Loading