diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-12 19:05:26 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:30:00 +0900 |
commit | 7255f55dba83aacbde76184aff965162e339ba2a (patch) | |
tree | 3ea69fd5c7a4883fe934ab15206b1861c76ff0d2 /spec/bundler/support | |
parent | d2d6d5c988b66cb110dbb07f92e08f231a31d6bc (diff) | |
download | ruby-7255f55dba83aacbde76184aff965162e339ba2a.tar.gz |
[bundler/bundler] RUBY_ENGINE should always be defined after 1.8.7
https://github.com/bundler/bundler/commit/d6c9196d18
Diffstat (limited to 'spec/bundler/support')
-rw-r--r-- | spec/bundler/support/hax.rb | 4 | ||||
-rw-r--r-- | spec/bundler/support/platforms.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/bundler/support/hax.rb b/spec/bundler/support/hax.rb index 202e8dcc32..826fbbcc0f 100644 --- a/spec/bundler/support/hax.rb +++ b/spec/bundler/support/hax.rb @@ -40,7 +40,7 @@ end class Object if ENV["BUNDLER_SPEC_RUBY_ENGINE"] - if defined?(RUBY_ENGINE) && RUBY_ENGINE != "jruby" && ENV["BUNDLER_SPEC_RUBY_ENGINE"] == "jruby" + if RUBY_ENGINE != "jruby" && ENV["BUNDLER_SPEC_RUBY_ENGINE"] == "jruby" begin # this has to be done up front because psych will try to load a .jar # if it thinks its on jruby @@ -50,7 +50,7 @@ class Object end end - remove_const :RUBY_ENGINE if defined?(RUBY_ENGINE) + remove_const :RUBY_ENGINE RUBY_ENGINE = ENV["BUNDLER_SPEC_RUBY_ENGINE"] if RUBY_ENGINE == "jruby" diff --git a/spec/bundler/support/platforms.rb b/spec/bundler/support/platforms.rb index caac7734bf..153704e666 100644 --- a/spec/bundler/support/platforms.rb +++ b/spec/bundler/support/platforms.rb @@ -65,7 +65,7 @@ module Spec end def local_ruby_engine - ENV["BUNDLER_SPEC_RUBY_ENGINE"] || (defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby") + ENV["BUNDLER_SPEC_RUBY_ENGINE"] || RUBY_ENGINE end def local_engine_version |