Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Oct 13, 2023
1 parent e86458e commit 1e0837b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/bundled_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def self.find_gem(path)
EXACT[n] or PREFIXED[n = n[%r[\A[^/]+(?=/)]]] && n
end

# for Bundler environment especially Bundler.setup.
def self.warning?(name)
name = name.tr("/", "-")
_t, path = $:.resolve_feature_path(name)
Expand Down Expand Up @@ -113,6 +114,8 @@ def self.build_message(gem)
freeze
end

# for RubyGems without Bundler environment.
# 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]
Expand Down

0 comments on commit 1e0837b

Please sign in to comment.