summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2021-01-28 17:57:02 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2021-01-28 18:01:06 +0900
commit763d242fcdb2cd400a8973d7d0da3e162fee90d6 (patch)
tree7f59c7a22ca678c7853b00cdcd748e071720f9fa /spec/bundler/runtime
parent7cd97a81d1010ec8f10585d86e7271a4a40e3990 (diff)
Use PWD instead of source_root
Because `.ext/common` is not relative from top source directory. Fix failures with out-of-place build directory.
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r--spec/bundler/runtime/setup_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index da1a2ae6e2..09430d6a8c 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -1340,7 +1340,8 @@ end
# override the default gem.
def load_path_exclusions_hack_for(name)
if ruby_core?
- ext_folder = source_root.join(".ext/common")
+ # .ext/common is relative from build directory
+ ext_folder = Pathname(ENV["PWD"]) + ".ext/common"
require_name = name.tr("-", "/")
if File.exist?(ext_folder.join("#{require_name}.rb"))
{ :exclude_from_load_path => ext_folder.to_s }