aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support/hax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/support/hax.rb')
-rw-r--r--spec/bundler/support/hax.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/bundler/support/hax.rb b/spec/bundler/support/hax.rb
index c8f78a34a1..3e1ece2f0a 100644
--- a/spec/bundler/support/hax.rb
+++ b/spec/bundler/support/hax.rb
@@ -1,6 +1,14 @@
# frozen_string_literal: true
module Gem
+ def self.ruby=(ruby)
+ @ruby = ruby
+ end
+
+ if ENV["RUBY"]
+ Gem.ruby = ENV["RUBY"]
+ end
+
if version = ENV["BUNDLER_SPEC_RUBYGEMS_VERSION"]
remove_const(:VERSION) if const_defined?(:VERSION)
VERSION = version