summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenji Okimoto <okimoto@clear-code.com>2018-03-12 17:49:35 +0900
committerKenji Okimoto <okimoto@clear-code.com>2018-04-23 09:21:08 +0900
commit20fc9c746b627e6d189dea552b4a0893059c8ccb (patch)
treefd81953aea962a1b41c5440b544dc517a2b0a859
parentc4d6f329c7ee72fed716262cf11ce0251ae4e810 (diff)
downloadbundler-20fc9c746b627e6d189dea552b4a0893059c8ccb.tar.gz
Add backward compatibility code for Ruby 1.8.7
-rw-r--r--spec/bundler/bundler_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
index abafe26f38..3e23f60f82 100644
--- a/spec/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler_spec.rb
@@ -302,8 +302,14 @@ EOF
end
after do
FileUtils.rm_rf("tmp/vendor/bundle")
- Bundler.remove_instance_variable(:@requires_sudo_ran)
- Bundler.remove_instance_variable(:@requires_sudo)
+ if Bundler.respond_to?(:remove_instance_variable)
+ Bundler.remove_instance_variable(:@requires_sudo_ran)
+ Bundler.remove_instance_variable(:@requires_sudo)
+ else
+ # TODO: Remove these code when Bundler drops Ruby 1.8.7 support
+ Bundler.send(:remove_instance_variable, :@requires_sudo_ran)
+ Bundler.send(:remove_instance_variable, :@requires_sudo)
+ end
end
context "writable paths" do
it "should return false and display nothing" do