method
system
v2_6_3 -
Show latest stable
- Class:
Bundler::RubyVersion
system()public
No documentation available.
# File lib/bundler/ruby_version.rb, line 104
def self.system
ruby_engine = if defined?(RUBY_ENGINE) && !RUBY_ENGINE.nil?
RUBY_ENGINE.dup
else
# not defined in ruby 1.8.7
"ruby"
end
# :sob: mocking RUBY_VERSION breaks stuff on 1.8.7
ruby_version = ENV.fetch("BUNDLER_SPEC_RUBY_VERSION") { RUBY_VERSION }.dup
ruby_engine_version = case ruby_engine
when "ruby"
ruby_version
when "rbx"
Rubinius::VERSION.dup
when "jruby"
JRUBY_VERSION.dup
else
RUBY_ENGINE_VERSION.dup
end
patchlevel = RUBY_PATCHLEVEL.to_s
@ruby_version ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)
end