1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use PWD instead of source_root

Because `.ext/common` is not relative from top source directory.
Fix failures with out-of-place build directory.
This commit is contained in:
Kazuhiro NISHIYAMA 2021-01-28 17:57:02 +09:00
parent 7cd97a81d1
commit 763d242fcd
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -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 }