Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit ddd3385

Browse files
authored
Merge pull request #486 from rspec/use-strict-predicates
Return a boolean for Support::Ruby.rbx?/truffleruby?
2 parents b70e742 + aa22fc4 commit ddd3385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rspec/support/ruby_features.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ def jruby_version
3333
end
3434

3535
def rbx?
36-
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
36+
!!defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
3737
end
3838

3939
def mri?
4040
!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby'
4141
end
4242

4343
def truffleruby?
44-
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby'
44+
!!defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby'
4545
end
4646
end
4747

0 commit comments

Comments
 (0)