Permalink
Browse files

Merge pull request #569 from sunaku/patch-1

at_exit: don't mask nonzero exit status due to $!
  • Loading branch information...
2 parents b06bc35 + e7fdaaa commit 74b170c34120989f45ed5614fbfa1c5588531865 @justinko justinko committed Feb 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rspec/core/runner.rb
@@ -7,7 +7,7 @@ class Runner
# Register an at_exit hook that runs the suite.
def self.autorun
return if autorun_disabled? || installed_at_exit? || running_in_drb?
- at_exit { exit run(ARGV, $stderr, $stdout).to_i }
+ at_exit { exit run(ARGV, $stderr, $stdout).to_i unless $! }
@installed_at_exit = true
end
AT_EXIT_HOOK_BACKTRACE_LINE = "#{__FILE__}:#{__LINE__ - 2}:in `autorun'"

0 comments on commit 74b170c

Please sign in to comment.