diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-05 12:07:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-05 18:56:37 +0900 |
commit | 4e6861d3376eb7857d2b0a947c97b6fec8e5bf37 (patch) | |
tree | 1c4aa411e92caf2ea49ef77dd67835d5f617de05 /lib | |
parent | e176f84138ff4fc5f7442cc969a281aeb714e7bd (diff) | |
download | ruby-4e6861d3376eb7857d2b0a947c97b6fec8e5bf37.tar.gz |
Fix `Gem::BUNDLED_GEMS.find_gem` return value
If the required name is different from the found gem name, return the
gem name, instead of true that means the required name is an exact gem
name.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundled_gems.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 2623e1e96f..7b8c907041 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -59,7 +59,7 @@ module Gem::BUNDLED_GEMS else return end - EXACT[n] or PREFIXED[n[%r[\A[^/]+(?=/)]]] + EXACT[n] or PREFIXED[n = n[%r[\A[^/]+(?=/)]]] && n end def self.warning?(name) |