Skip to content

Commit 7b23568

Browse files
committed
Fix check in spec_helper.rb to work even with --unguarded
1 parent 45a0b83 commit 7b23568

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/ruby/spec_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def report_on_exception=(value)
2727
end
2828
end
2929

30-
ruby_version_is ""..."2.7" do
30+
# Compare with SpecVersion directly here so it works even with --unguarded
31+
if VersionGuard::FULL_RUBY_VERSION < SpecVersion.new('2.7')
3132
abort "This version of ruby/spec requires Ruby 2.7+"
3233
end
3334

0 commit comments

Comments
 (0)