summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-08-04 14:52:15 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-08-04 17:52:12 +0200
commitf9d910403bd7dc69ee7faf1af4c08a21c2489b6d (patch)
treec3811495644bc3a93e6264ee54fa409232855ab8 /lib/bundler
parente1c518363641208429f397170354054b3d28effd (diff)
downloadbundler-f9d910403bd7dc69ee7faf1af4c08a21c2489b6d.tar.gz
Use the standard RUBY_ENGINE_VERSION instead of JRUBY_VERSION
* RUBY_ENGINE and RUBY_ENGINE_VERSION are defined on every modern Ruby. * There is no such constant as TRUFFLERUBY_VERSION or RBX_VERSION.
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/ruby_version.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index b981cba21d..7e403ce6fc 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -103,18 +103,8 @@ module Bundler
def self.system
ruby_engine = RUBY_ENGINE.dup
- # :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
+ ruby_engine_version = RUBY_ENGINE_VERSION.dup
patchlevel = RUBY_PATCHLEVEL.to_s
@ruby_version ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)