Skip to content

Commit

Permalink
Update lib/bundler/rubygems_ext.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
  • Loading branch information
hsbt and nobu authored Jul 11, 2023
1 parent 4869f0a commit 7ccf9db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def load_paths

def self.bundled_stubs
require "bundled_gems"

rescue LoadError
[]
else
Gem.bundled_gems.map do |name, version|
if Gem::Specification.respond_to?(:find_by_full_name)
Gem::Specification.find_by_full_name("#{name}-#{version}")
Expand All @@ -78,8 +80,6 @@ def self.bundled_stubs
end
rescue Gem::MissingSpecError
end.compact
rescue LoadError
[]
end

alias_method :rg_extension_dir, :extension_dir
Expand Down

0 comments on commit 7ccf9db

Please sign in to comment.