diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-11-14 17:27:42 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-11-15 08:16:03 +0900 |
| commit | b44272fcb456bb723d3dfa3b3736a05a2cbf30b2 (patch) | |
| tree | 8d75154ccda8a3c429579d32a3223ae04ccef7c3 /lib | |
| parent | 31bdffb5b987e3086b7954f3fc164872f2075918 (diff) | |
Port test_warn_bundled_gems.rb to RSpec example
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12086
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundled_gems.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index ed7b8e278a..6a20f51958 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -52,7 +52,11 @@ module Gem::BUNDLED_GEMS WARNED = {} # unfrozen conf = ::RbConfig::CONFIG - LIBDIR = (conf["rubylibdir"] + "/").freeze + if !File.exist?(conf["rubylibdir"]) + LIBDIR = (File.expand_path(File.join(__dir__, "..", "lib")) + "/").freeze + else + LIBDIR = (conf["rubylibdir"] + "/").freeze + end ARCHDIR = (conf["rubyarchdir"] + "/").freeze dlext = [conf["DLEXT"], "so"].uniq DLEXT = /\.#{Regexp.union(dlext)}\z/ |
