From 6339904566c741c1a1d50df5dd8d187b7baadbf1 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Mon, 10 Jun 2024 00:29:42 +0000 Subject: [PATCH] Remove support for ruby-3.0 --- .github/workflows/ci.yml | 10 +++++----- Changelog.md | 6 ++++++ README.md | 2 +- scripts/devloop.sh | 2 +- spec/unit/unparser_spec.rb | 8 -------- test/corpus/literal/lambda.rb | 3 +++ test/corpus/literal/pattern.rb | 4 ++++ test/corpus/literal/range.rb | 1 + test/corpus/literal/since/27.rb | 4 ---- test/corpus/literal/since/30.rb | 4 ---- unparser.gemspec | 2 +- 11 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 test/corpus/literal/since/27.rb delete mode 100644 test/corpus/literal/since/30.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f981170c..c697391d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3] + ruby: [ruby-3.1, ruby-3.2, ruby-3.3] os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3] + ruby: [ruby-3.1, ruby-3.2, ruby-3.3] os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3] + ruby: [ruby-3.1, ruby-3.2, ruby-3.3] os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -69,7 +69,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3] + ruby: [ruby-3.1, ruby-3.2, ruby-3.3] os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -85,7 +85,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3] + ruby: [ruby-3.1, ruby-3.2, ruby-3.3] os: [ubuntu-latest] steps: - uses: actions/checkout@v4 diff --git a/Changelog.md b/Changelog.md index 64557323..7c38bc10 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# v0.6.14 2024-06-10 + +[#369](https://github.com/mbj/unparser/pull/369) + +* Remove support for ruby-3.0, its EOL. + # v0.6.13 2024-02-01 [#361](https://github.com/mbj/unparser/pull/361) diff --git a/README.md b/README.md index 75a9d202..3ee04936 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The following constraints apply: * No support for macruby extensions * Only support for the [modern AST](https://github.com/whitequark/parser/#usage) format -* Only support for Ruby >= 3.0 +* Only support for Ruby >= 3.1 Notable Users: diff --git a/scripts/devloop.sh b/scripts/devloop.sh index f3d6ab0b..72a7b2e7 100755 --- a/scripts/devloop.sh +++ b/scripts/devloop.sh @@ -1,5 +1,5 @@ while inotifywait lib/**/*.rb test/**/*.rb spec/**/*.rb Gemfile unparser.gemspec; do - bundle exec rspec spec/unit -fd --fail-fast --order default \ + bundle exec rspec spec/unit -fd --fail-fast --order defined \ && bundle exec ./bin/parser-round-trip-test \ && bundle exec mutant run --zombie --since HEAD~1 --fail-fast -- 'Unparser*' \ && bundle exec rubocop diff --git a/spec/unit/unparser_spec.rb b/spec/unit/unparser_spec.rb index 43d6867a..82a15dcc 100644 --- a/spec/unit/unparser_spec.rb +++ b/spec/unit/unparser_spec.rb @@ -417,14 +417,6 @@ def noop ) end - if RUBY_VERSION < '3.0.' - excludes.concat( - %w[ - test/corpus/literal/since/30.rb - ] - ) - end - excludes.flat_map { |file| ['--ignore', file] } end diff --git a/test/corpus/literal/lambda.rb b/test/corpus/literal/lambda.rb index 4eb722da..aba17817 100644 --- a/test/corpus/literal/lambda.rb +++ b/test/corpus/literal/lambda.rb @@ -11,3 +11,6 @@ } ->(a, b; c) { } +-> { + _1 + _2 +} diff --git a/test/corpus/literal/pattern.rb b/test/corpus/literal/pattern.rb index ae1ba429..ebd5110a 100644 --- a/test/corpus/literal/pattern.rb +++ b/test/corpus/literal/pattern.rb @@ -39,3 +39,7 @@ else end 1 in [a] +1 => [a] +1 => [*] +1 in [*, 42, *] +1 in [*, a, *foo] diff --git a/test/corpus/literal/range.rb b/test/corpus/literal/range.rb index eb1f3874..ebb334ad 100644 --- a/test/corpus/literal/range.rb +++ b/test/corpus/literal/range.rb @@ -2,3 +2,4 @@ 1..2 (1...) 1...2 +(..1) diff --git a/test/corpus/literal/since/27.rb b/test/corpus/literal/since/27.rb deleted file mode 100644 index c332f9e4..00000000 --- a/test/corpus/literal/since/27.rb +++ /dev/null @@ -1,4 +0,0 @@ --> { - _1 + _2 -} -(..1) diff --git a/test/corpus/literal/since/30.rb b/test/corpus/literal/since/30.rb deleted file mode 100644 index b73328a4..00000000 --- a/test/corpus/literal/since/30.rb +++ /dev/null @@ -1,4 +0,0 @@ -1 => [a] -1 => [*] -1 in [*, 42, *] -1 in [*, a, *foo] diff --git a/unparser.gemspec b/unparser.gemspec index 9a9d097a..b79e25ce 100644 --- a/unparser.gemspec +++ b/unparser.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.metadata['rubygems_mfa_required'] = 'true' - gem.required_ruby_version = '>= 3.0' + gem.required_ruby_version = '>= 3.1' gem.add_dependency('diff-lcs', '~> 1.3') gem.add_dependency('parser', '>= 3.3.0')