Skip to content

Commit

Permalink
Merge pull request #571 from rspec/supports_syntax_suggest
Browse files Browse the repository at this point in the history
Add RubyFeatures#supports_syntax_suggest?
  • Loading branch information
JonRowe committed Apr 11, 2023
2 parents a92680d + ba795f8 commit 809a164
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/rspec/support/ruby_features.rb
Expand Up @@ -94,6 +94,16 @@ def supports_exception_cause?
end
end

if RUBY_VERSION.to_f >= 3.2
def supports_syntax_suggest?
true
end
else
def supports_syntax_suggest?
false
end
end

if RUBY_VERSION.to_f >= 2.7
def supports_taint?
false
Expand Down
4 changes: 4 additions & 0 deletions spec/rspec/support/ruby_features_spec.rb
Expand Up @@ -99,6 +99,10 @@ module Support
RubyFeatures.supports_rebinding_module_methods?
end

specify "#supports_syntax_suggest?" do
expect(RubyFeatures.supports_syntax_suggest?).to eq(RUBY_VERSION.to_f >= 3.2)
end

specify "#supports_taint?" do
RubyFeatures.supports_taint?
end
Expand Down

0 comments on commit 809a164

Please sign in to comment.