Skip to content

Commit

Permalink
Fix Gem::BUNDLED_GEMS.find_gem return value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nobu committed Aug 5, 2023
1 parent e176f84 commit 4e6861d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundled_gems.rb
Expand Up @@ -59,7 +59,7 @@ def self.find_gem(path)
else
return
end
EXACT[n] or PREFIXED[n[%r[\A[^/]+(?=/)]]]
EXACT[n] or PREFIXED[n = n[%r[\A[^/]+(?=/)]]] && n
end

def self.warning?(name)
Expand Down

0 comments on commit 4e6861d

Please sign in to comment.