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 48

def jruby?
  RUBY_ENGINE == "jruby"
end

#maglev?Boolean (readonly)

[ GitHub ]

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

def maglev?
  message =
    "`CurrentRuby#maglev?` is deprecated with no replacement. Please use the " \
    "built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
  removed_message =
    "`CurrentRuby#maglev?` was removed with no replacement. Please use the " \
    "built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
  internally_exempted = caller_locations(1, 1).first.path == __FILE__

  unless internally_exempted
    SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
  end

  RUBY_ENGINE == "maglev"
end

#mingw? (readonly)

Alias for #windows?.

[ GitHub ]

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

alias_method :mingw?, :windows?

#mri?Boolean (readonly)

[ GitHub ]

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

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

#mswin64? (readonly)

Alias for #windows?.

[ GitHub ]

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

alias_method :mswin64?, :windows?

#mswin? (readonly)

Alias for #windows?.

[ GitHub ]

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

alias_method :mswin?, :windows?

#rbx?Boolean (readonly)

[ GitHub ]

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

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

#ruby?Boolean (readonly)

[ GitHub ]

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

def ruby?
  return true if Bundler::GemHelpers.generic_local_platform_is_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 68

def truffleruby?
  RUBY_ENGINE == "truffleruby"
end

#windows?Boolean (readonly) Also known as: #mswin?, #mswin64?, #mingw?, #x64_mingw?

[ GitHub ]

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

def windows?
  Gem.win_platform?
end

#x64_mingw? (readonly)

Alias for #windows?.

[ GitHub ]

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

alias_method :x64_mingw?, :windows?