Class: Bundler::CurrentRuby
- Inherits:
-
Object
- Object
- Bundler::CurrentRuby
- Defined in:
- lib/bundler/current_ruby.rb
Constant Summary collapse
- KNOWN_MINOR_VERSIONS =
%w( 1.8 1.9 2.0 2.1 2.2 2.3 2.4 ).freeze
- KNOWN_MAJOR_VERSIONS =
KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze
- KNOWN_PLATFORMS =
%w( jruby maglev mingw mri mswin mswin64 rbx ruby x64_mingw ).freeze
Instance Method Summary collapse
- #jruby? ⇒ Boolean
- #maglev? ⇒ Boolean
- #mingw? ⇒ Boolean
- #mri? ⇒ Boolean
- #mswin64? ⇒ Boolean
- #mswin? ⇒ Boolean
- #rbx? ⇒ Boolean
- #ruby? ⇒ Boolean
- #x64_mingw? ⇒ Boolean
Instance Method Details
#jruby? ⇒ Boolean
47 48 49 |
# File 'lib/bundler/current_ruby.rb', line 47 def jruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" end |
#maglev? ⇒ Boolean
51 52 53 |
# File 'lib/bundler/current_ruby.rb', line 51 def maglev? defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev" end |
#mingw? ⇒ Boolean
63 64 65 |
# File 'lib/bundler/current_ruby.rb', line 63 def mingw? Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu != "x64" end |
#mri? ⇒ Boolean
39 40 41 |
# File 'lib/bundler/current_ruby.rb', line 39 def mri? !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") end |
#mswin64? ⇒ Boolean
59 60 61 |
# File 'lib/bundler/current_ruby.rb', line 59 def mswin64? Bundler::WINDOWS && Gem::Platform.local.os == "mswin64" && Gem::Platform.local.cpu == "x64" end |
#mswin? ⇒ Boolean
55 56 57 |
# File 'lib/bundler/current_ruby.rb', line 55 def mswin? Bundler::WINDOWS end |
#rbx? ⇒ Boolean
43 44 45 |
# File 'lib/bundler/current_ruby.rb', line 43 def rbx? ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx" end |
#ruby? ⇒ Boolean
35 36 37 |
# File 'lib/bundler/current_ruby.rb', line 35 def ruby? !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev") end |