Skip to content

Commit 540d484

Browse files
committed
Raise minimum supported ruby version to 3.3
I want to start porting this to prism without the translation layer.
1 parent 12e755a commit 540d484

8 files changed

Lines changed: 5 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
2525
with:
2626
engine: cruby
27+
min_version: 3.3
2728

2829
test:
2930
needs: ruby-versions

.standard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby_version: 3.0.0
1+
ruby_version: 3.3.0

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## HEAD (unreleased)
22

3+
- Changed: Changed: Minimum supported Ruby version is now 3.3. (https://github.com/ruby/syntax_suggest/pull/246)
4+
35
## 2.0.3
46

57
- Fix: Correctly identify trailing slashes when using Prism > 1.8.0. (https://github.com/ruby/syntax_suggest/pull/243)

spec/integration/ruby_command_line_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,13 @@ module SyntaxSuggest
9494
end
9595

9696
it "gem can be tested when executing on Ruby with default gem included" do
97-
skip if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
98-
9997
out = `#{ruby} -I#{lib_dir} -rsyntax_suggest -e "puts SyntaxError.instance_method(:detailed_message).source_location" 2>&1`
10098

10199
expect($?.success?).to be_truthy
102100
expect(out).to include(lib_dir.join("syntax_suggest").join("core_ext.rb").to_s).once
103101
end
104102

105103
it "annotates a syntax error in Ruby 3.2+ when require is not used" do
106-
skip if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
107-
108104
Dir.mktmpdir do |dir|
109105
tmpdir = Pathname(dir)
110106
script = tmpdir.join("script.rb")

spec/unit/api_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ def fake_error.message
6969
end
7070

7171
it "respects highlight API" do
72-
skip if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
73-
7472
core_ext_file = lib_dir.join("syntax_suggest").join("core_ext.rb")
7573
require_relative core_ext_file
7674

@@ -91,8 +89,6 @@ def detailed_message(**kwargs)
9189
end
9290

9391
it "can be disabled via falsey kwarg" do
94-
skip if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
95-
9692
core_ext_file = lib_dir.join("syntax_suggest").join("core_ext.rb")
9793
require_relative core_ext_file
9894

spec/unit/code_line_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ def to_json(*opts)
1717
end
1818

1919
it "supports endless method definitions" do
20-
skip("Unsupported ruby version") unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3")
21-
2220
line = CodeLine.from_source(<<~EOM).first
2321
def square(x) = x * x
2422
EOM

spec/unit/core_ext_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
module SyntaxSuggest
44
RSpec.describe "Core extension" do
55
it "SyntaxError monkepatch ensures there is a newline to the end of the file" do
6-
skip if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
7-
86
Dir.mktmpdir do |dir|
97
tmpdir = Pathname(dir)
108
file = tmpdir.join("file.rb")

syntax_suggest.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
1616
spec.description = 'When you get an "unexpected end" in your syntax this gem helps you find it'
1717
spec.homepage = "https://github.com/ruby/syntax_suggest.git"
1818
spec.license = "MIT"
19-
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
19+
spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
2020

2121
spec.metadata["homepage_uri"] = spec.homepage
2222
spec.metadata["source_code_uri"] = "https://github.com/ruby/syntax_suggest.git"

0 commit comments

Comments
 (0)