123456789_123456789_123456789_123456789_123456789_

Class: Bundler::CurrentRuby

Relationships & Source Files
Inherits: Object
Defined in: lib/bundler/current_ruby.rb

Constant Summary

Instance Attribute Summary

Instance Attribute Details

#jruby?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 57

def jruby?
  RUBY_ENGINE == "jruby"
end

#maglev?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 61

def maglev?
  RUBY_ENGINE == "maglev"
end

#mingw?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 85

def mingw?
  windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu != "x64"
end

#mri?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 49

def mri?
  !windows? && RUBY_ENGINE == "ruby"
end

#mswin64?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 81

def mswin64?
  windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin64" && Bundler.local_platform.cpu == "x64"
end

#mswin?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 73

def mswin?
  # For backwards compatibility
  windows?

  # TODO: This should correctly be:
  # windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin32" && Bundler.local_platform.cpu == "x86"
end

#rbx?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 53

def rbx?
  ruby? && RUBY_ENGINE == "rbx"
end

#ruby?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 43

def ruby?
  return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::RUBY

  !windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
end

#truffleruby?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 65

def truffleruby?
  RUBY_ENGINE == "truffleruby"
end

#windows?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 69

def windows?
  Gem.win_platform?
end

#x64_mingw?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/current_ruby.rb', line 89

def x64_mingw?
  Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os.start_with?("mingw") && Bundler.local_platform.cpu == "x64"
end