diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-11-02 13:32:53 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-11-02 13:32:53 +0900 |
commit | e34e8b93f8fac3ef40ab5ed8672fa003f3b4d9c0 (patch) | |
tree | 435f7f27c9a1c981106f3a66d62bdfe02fc78028 /lib/bundled_gems.rb | |
parent | d9cb75b741c786a1198f7c7e9d1eead6818b9d17 (diff) | |
download | ruby-e34e8b93f8fac3ef40ab5ed8672fa003f3b4d9c0.tar.gz |
Support Pathname object for warning feature of bundled gems
Diffstat (limited to 'lib/bundled_gems.rb')
-rw-r--r-- | lib/bundled_gems.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index f201800cf6..6fff10fdcf 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -70,6 +70,7 @@ module Gem::BUNDLED_GEMS end def self.warning?(name, specs: nil) + name = File.path(name) # name can be a feature name or a file path with String or Pathname return if specs.to_a.map(&:name).include?(name.sub(LIBEXT, "")) name = name.tr("/", "-") _t, path = $:.resolve_feature_path(name) |