From 5e59ae186fcf8c93ca63a32abd70bffc0db43d73 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Mon, 14 Apr 2025 19:18:49 -0700 Subject: [PATCH] [ruby/stringio] Fix Ruby 3.4 check https://github.com/ruby/stringio/commit/a27c5d5e2e Co-authored-by: Sutou Kouhei --- ext/stringio/stringio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index e27186f694..4041537d25 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1866,7 +1866,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self) } ptr->enc = enc; if (!NIL_P(ptr->string) && WRITABLE(self) -#if RUBY_API_VERSION_MAJOR == 3 || RUBY_API_VERSION_MAJOR >= 4 +#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+ && !FL_TEST_RAW(ptr->string, RUBY_FL_USER2 | RUBY_FL_USER3) #endif