summaryrefslogtreecommitdiff
path: root/lib/rubygems/request_set/gem_dependency_api.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-08-04 14:39:55 +0200
committerHiroshi SHIBATA <[email protected]>2019-08-05 18:45:24 +0900
commit86ac51c301e62abb4eb0962e04e587ba8298bf80 ()
treeed6b883b4103e9fa965f322a2436f7413b5aa9a4 /lib/rubygems/request_set/gem_dependency_api.rb
parent2ea2108a9fb1460342226f54cbf54ddd79ea1cc2 (diff)
[rubygems/rubygems] 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://.com/rubygems/rubygems/commit/431d0aefdd
-rw-r--r--lib/rubygems/request_set/gem_dependency_api.rb8
1 files changed, 3 insertions, 5 deletions
@@ -782,7 +782,7 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
# You may also provide +engine:+ and +engine_version:+ options to restrict
# this gem dependencies file to a particular ruby engine and its engine
# version. This matching is performed by using the RUBY_ENGINE and
- # engine_specific VERSION constants. (For JRuby, JRUBY_VERSION).
def ruby(version, options = {})
engine = options[:engine]
@@ -809,11 +809,9 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
end
if engine_version
- my_engine_version = Object.const_get "#{Gem.ruby_engine.upcase}_VERSION"
-
- if engine_version != my_engine_version
message =
- "Your Ruby engine version is #{Gem.ruby_engine} #{my_engine_version}, " +
"but your #{gem_deps_file} requires #{engine} #{engine_version}"
raise Gem::RubyVersionMismatch, message