From 919ca0bad21b27d2f045e53226db502167aa73a2 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sun, 27 Jul 2025 16:32:59 +0100 Subject: [PATCH] Restrict async to MRI Ruby only --- .github/workflows/test.yaml | 6 ------ async.gemspec | 1 + lib/async/scheduler.rb | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6810b591..3b39e386 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,12 +28,6 @@ jobs: experimental: [false] include: - - os: ubuntu - ruby: truffleruby - experimental: true - - os: ubuntu - ruby: jruby - experimental: true - os: ubuntu ruby: head experimental: true diff --git a/async.gemspec b/async.gemspec index fc1e6918..a2cdd79f 100644 --- a/async.gemspec +++ b/async.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |spec| spec.files = Dir.glob(["{lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__) spec.required_ruby_version = ">= 3.2" + spec.required_ruby_engine = "ruby" spec.add_dependency "console", "~> 1.29" spec.add_dependency "fiber-annotation" diff --git a/lib/async/scheduler.rb b/lib/async/scheduler.rb index 568a5ff2..e015e0eb 100644 --- a/lib/async/scheduler.rb +++ b/lib/async/scheduler.rb @@ -347,7 +347,7 @@ def io_read(io, buffer, length, offset = 0) timer&.cancel! end - if RUBY_ENGINE != "ruby" || RUBY_VERSION >= "3.3.1" + if RUBY_VERSION >= "3.3.1" # Write the specified buffer to the IO. # # @public Since *Async v2* and *Ruby v3.3.1* with `IO::Buffer` support.