Skip to content

Commit bab8be2

Browse files
committed
Removed redundant begin
1 parent 2e20c32 commit bab8be2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bundler/lib/bundler.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,10 @@ def load_plugins(definition = Bundler.definition)
566566

567567
requested_path_gems = definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
568568
path_plugin_files = requested_path_gems.map do |spec|
569-
begin
570-
Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
571-
rescue TypeError
572-
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
573-
raise Gem::InvalidSpecificationException, error_message
574-
end
569+
Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
570+
rescue TypeError
571+
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
572+
raise Gem::InvalidSpecificationException, error_message
575573
end.flatten
576574
Bundler.rubygems.load_plugin_files(path_plugin_files)
577575
@load_plugins_ran = true

0 commit comments

Comments
 (0)