Skip to content

Commit

Permalink
The SINCE and WARNED hashes take gem names, not features
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Dec 8, 2023
1 parent 4817166 commit d61af5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/bundled_gems.rb
Expand Up @@ -150,8 +150,11 @@ def self.build_message(gem)
# If loading library is not part of the default gems and the bundled gems, warn it.
class LoadError
def message
if !defined?(Bundler) && Gem::BUNDLED_GEMS::SINCE[path] && !Gem::BUNDLED_GEMS::WARNED[path]
warn path + Gem::BUNDLED_GEMS.build_message(path)
return super unless path

name = path.tr("/", "-")
if !defined?(Bundler) && Gem::BUNDLED_GEMS::SINCE[name] && !Gem::BUNDLED_GEMS::WARNED[name]
warn name + Gem::BUNDLED_GEMS.build_message(name)
end
super
end
Expand Down

0 comments on commit d61af5c

Please sign in to comment.