diff options
| author | Daniel Lee Harple | 2013-05-18 08:34:28 -0400 |
|---|---|---|
| committer | Jack Nagel | 2013-05-22 19:53:05 -0500 |
| commit | 88d5a5a6328bb9da1f5266863d3a93a2baa010a2 (patch) | |
| tree | 6b9f3c1fe6416724075bd823af4ab0018ebb2c28 /Library/Homebrew/cmd | |
| parent | c2f9c5dff75c6568089f6610d40a67cc568a86af (diff) | |
| download | homebrew-88d5a5a6328bb9da1f5266863d3a93a2baa010a2.tar.bz2 | |
Remove unnecessary rescue-all exception handling
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 2ceefd2ce..e86594253 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -64,16 +64,13 @@ module Homebrew extend self results = [] GitHub.open "https://api.github.com/repos/#{user}/homebrew-#{repo}/git/trees/HEAD?recursive=1" do |f| - begin - user.downcase! if user == "Homebrew" # special handling for the Homebrew organization - MultiJson.decode(f.read)["tree"].map{ |hash| hash['path'] }.compact.each do |file| - name = File.basename(file, '.rb') - if file =~ /\.rb$/ and name =~ rx - results << "#{user}/#{repo}/#{name}" - $found += 1 - end + user.downcase! if user == "Homebrew" # special handling for the Homebrew organization + MultiJson.decode(f.read)["tree"].map{ |hash| hash['path'] }.compact.each do |file| + name = File.basename(file, '.rb') + if file =~ /\.rb$/ and name =~ rx + results << "#{user}/#{repo}/#{name}" + $found += 1 end - rescue end end results |
