Module: RSpec::Support::Ruby Private
- Defined in:
- lib/rspec/support/ruby_features.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Provides query methods for different rubies
Class Method Summary collapse
- .jruby? ⇒ Boolean private
- .jruby_9000? ⇒ Boolean private
- .jruby_version ⇒ Object private
- .mri? ⇒ Boolean private
- .non_mri? ⇒ Boolean private
- .rbx? ⇒ Boolean private
Class Method Details
.jruby? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/rspec/support/ruby_features.rb', line 27 def jruby? RUBY_PLATFORM == 'java' end |
.jruby_9000? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 |
# File 'lib/rspec/support/ruby_features.rb', line 35 def jruby_9000? jruby? && JRUBY_VERSION >= '9.0.0.0' end |
.jruby_version ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/rspec/support/ruby_features.rb', line 31 def jruby_version @jruby_version ||= ComparableVersion.new(JRUBY_VERSION) end |
.mri? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/rspec/support/ruby_features.rb', line 47 def mri? !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' end |
.non_mri? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/rspec/support/ruby_features.rb', line 43 def non_mri? !mri? end |
.rbx? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/rspec/support/ruby_features.rb', line 39 def rbx? defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' end |