Support Pathname object for warning feature of bundled gems
This commit is contained in:
parent
d9cb75b741
commit
e34e8b93f8
@ -70,6 +70,7 @@ module Gem::BUNDLED_GEMS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.warning?(name, specs: nil)
|
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, ""))
|
return if specs.to_a.map(&:name).include?(name.sub(LIBEXT, ""))
|
||||||
name = name.tr("/", "-")
|
name = name.tr("/", "-")
|
||||||
_t, path = $:.resolve_feature_path(name)
|
_t, path = $:.resolve_feature_path(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user