summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-08-04 14:52:15 +0200
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-08-16 14:30:23 +0900
commit2b0f3aa095a410902b9b2e4fb14f909e0630c1a1 (patch)
tree6901f30fc32837107c3fb1771a49ec9e3cde93e6 /lib/bundler
parent6711343d5a630cc857f0fa503b403edb68415f48 (diff)
[bundler/bundler] 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. https://github.com/bundler/bundler/commit/f9d910403b
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2366
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)