Permalink
Browse files

Explicitly catch a gem load error.

Don't just have a generic rescue block.  By default, a paramater-less rescue clause will only catch exceptions that inherit from StandardError.  Gem::LoadError doesn't, which means it would never be caught by a blank rescue clause.

Signed-off-by: Nick Sieger <nicksieger@gmail.com>
  • Loading branch information...
1 parent 57e3056 commit 509a989247a98b4545e5add1e4657fecd7f9ad00 @mathie mathie committed with nicksieger Apr 24, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 tasks/ci_reporter.rake
View
@@ -4,7 +4,7 @@
begin
gem 'ci_reporter'
-rescue
+rescue Gem::LoadError
$: << File.dirname(__FILE__) + "/../lib"
end
require 'ci/reporter/rake/rspec'

0 comments on commit 509a989

Please sign in to comment.