From cd624797f298c2e4f52c6ffed2444ec737a8e59a Mon Sep 17 00:00:00 2001 From: Daiki Kudo <44487754+kudojp@users.noreply.github.com> Date: Sun, 3 Sep 2023 17:57:40 +0900 Subject: [PATCH] Fix supported Ruby version to be only `3.1.x` (#32) * Update spec.required_ruby_version = "~> 3.1.0" * Don't run ci test with ruby 3.0 which is not supported --- .github/workflows/ci.yaml | 2 +- async_scheduler.gemspec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16c363a..a363478 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - ruby: [3.0, 3.1] + ruby: ['3.1'] runs-on: ${{ matrix.os }} steps: - uses: ruby/setup-ruby@v1 diff --git a/async_scheduler.gemspec b/async_scheduler.gemspec index 9a53171..1b0ce88 100644 --- a/async_scheduler.gemspec +++ b/async_scheduler.gemspec @@ -12,7 +12,11 @@ Gem::Specification.new do |spec| spec.description = "This is a task scheduler which implements the FiberScheduler interface" spec.homepage = "https://github.com/kudojp/async_scheduler" spec.license = "MIT" - spec.required_ruby_version = ">= 3.0.0" + # The interface of FiberScheduler#io_read had a breaking change from Ruby 3.0 to 3.1. + # - Ruby 3.0: #io_read takes 4 arguments. + # - Ruby 3.1: #io_read takes 3 arguments. + # The implementation of scheduler#io_read in this gem takes only 3 arguments. + spec.required_ruby_version = "~> 3.1.0" spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"