summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-12 19:05:26 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-06-26 18:02:07 +0200
commitd6c9196d184366694fafb4fedfd72ec375bebaf8 (patch)
treeba01cda4b1131f36affb640216675cfaa6d335b9 /spec/support
parent547975644e93d1c421a468ab5e2396b5b953158b (diff)
downloadbundler-ruby_engine_always_defined.tar.gz
RUBY_ENGINE should always be defined after 1.8.7ruby_engine_always_defined
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/hax.rb4
-rw-r--r--spec/support/platforms.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
index 202e8dcc32..826fbbcc0f 100644
--- a/spec/support/hax.rb
+++ b/spec/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/support/platforms.rb b/spec/support/platforms.rb
index caac7734bf..153704e666 100644
--- a/spec/support/platforms.rb
+++ b/spec/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