Less code in begin block

This commit is contained in:
Jack Nagel 2014-11-10 19:24:46 -06:00
parent cb684f6c1a
commit bf53f3fd16

View File

@ -604,10 +604,11 @@ module Homebrew
test_error = false test_error = false
begin begin
test = Test.new(argument, tap) test = Test.new(argument, tap)
test_error = !test.run
rescue ArgumentError => e rescue ArgumentError => e
test_error = true test_error = true
ofail e.message ofail e.message
else
test_error = !test.run
end end
any_errors ||= test_error any_errors ||= test_error
tests << test tests << test