From 1e0837bb7a3e6c93d9b5e9c3e20321eb93706576 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 13 Oct 2023 13:27:24 +0900 Subject: [PATCH] comment --- lib/bundled_gems.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index cd95b51884e8a5..3f77d84dab5a3b 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -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) @@ -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]