[ruby/stringio] Fix Ruby 3.4 check
https://github.com/ruby/stringio/commit/a27c5d5e2e Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
This commit is contained in:
parent
18d395e078
commit
5e59ae186f
@ -1866,7 +1866,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
|
|||||||
}
|
}
|
||||||
ptr->enc = enc;
|
ptr->enc = enc;
|
||||||
if (!NIL_P(ptr->string) && WRITABLE(self)
|
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+
|
// Do not attempt to modify chilled strings on Ruby 3.4+
|
||||||
&& !FL_TEST_RAW(ptr->string, RUBY_FL_USER2 | RUBY_FL_USER3)
|
&& !FL_TEST_RAW(ptr->string, RUBY_FL_USER2 | RUBY_FL_USER3)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user