lib/benchmark_driver/runner.rb in benchmark_driver-0.14.16 vs lib/benchmark_driver/runner.rb in benchmark_driver-0.14.17
- old
+ new
@@ -91,11 +91,17 @@
BenchmarkDriver.const_get("Runner::#{match[:namespace]}", false)
end
def with_clean_env(&block)
require 'bundler'
- Bundler.with_clean_env do
- block.call
+ if Bundler.respond_to?(:with_unbundled_env)
+ Bundler.with_unbundled_env do
+ block.call
+ end
+ else
+ Bundler.with_clean_env do
+ block.call
+ end
end
rescue LoadError
block.call
end
end