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 e80752f commit 839acc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundled_gems.rb
Original file line number Diff line number Diff line change
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 839acc7

Please sign in to comment.