Module: RSpec::Support::RubyFeatures Private
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/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 ruby features that differ among implementations.
Class Method Summary collapse
- .caller_locations_supported? ⇒ Boolean private
- .distincts_kw_args_from_positional_hash? ⇒ Boolean private
- .module_prepends_supported? ⇒ Boolean private
- .module_refinement_supported? ⇒ Boolean private
- .optional_and_splat_args_supported? ⇒ Boolean private
Instance Method Summary collapse
-
#fork_supported? ⇒ Boolean
private
On JRuby 1.7 ‘–1.8` mode, `Process.respond_to?(:fork)` returns true, but when you try to fork, it raises an error: NotImplementedError: fork is not available on this platform.
- #kw_args_supported? ⇒ Boolean private
- #required_kw_args_supported? ⇒ Boolean private
- #ripper_supported? ⇒ Boolean private
- #supports_exception_cause? ⇒ Boolean private
- #supports_rebinding_module_methods? ⇒ Boolean private
- #supports_taint? ⇒ Boolean private
Class Method Details
.caller_locations_supported? ⇒ 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.
83 84 85 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 83 def caller_locations_supported? respond_to?(:caller_locations, true) end |
.distincts_kw_args_from_positional_hash? ⇒ 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.
132 133 134 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 132 def distincts_kw_args_from_positional_hash? RUBY_VERSION >= '3.0.0' end |
.module_prepends_supported? ⇒ 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.
193 194 195 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 193 def module_prepends_supported? Module.method_defined?(:prepend) || Module.private_method_defined?(:prepend) end |
.module_refinement_supported? ⇒ 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.
189 190 191 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 189 def module_refinement_supported? Module.method_defined?(:refine) || Module.private_method_defined?(:refine) end |
.optional_and_splat_args_supported? ⇒ 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.
79 80 81 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 79 def optional_and_splat_args_supported? Method.method_defined?(:parameters) end |
Instance Method Details
#fork_supported? ⇒ 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.
On JRuby 1.7 ‘–1.8` mode, `Process.respond_to?(:fork)` returns true, but when you try to fork, it raises an error:
NotImplementedError: fork is not available on this platform
When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop this special case.
70 71 72 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 70 def fork_supported? false end |
#kw_args_supported? ⇒ 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.
137 138 139 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 137 def kw_args_supported? RUBY_VERSION >= '2.0.0' end |
#required_kw_args_supported? ⇒ 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.
141 142 143 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 141 def required_kw_args_supported? RUBY_VERSION >= '2.1.0' end |
#ripper_supported? ⇒ 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.
123 124 125 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 123 def ripper_supported? true end |
#supports_exception_cause? ⇒ 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.
88 89 90 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 88 def supports_exception_cause? true end |
#supports_rebinding_module_methods? ⇒ 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.
145 146 147 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 145 def supports_rebinding_module_methods? RUBY_VERSION.to_i >= 2 end |
#supports_taint? ⇒ 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.
98 99 100 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb', line 98 def supports_taint? false end |