Permalink
Browse files

Explicitly cast Process::Status to integer before using with Kernel#e…

…xit .
  • Loading branch information...
Pistos committed Dec 5, 2011
1 parent df219d9 commit 6d3dbf1b47e87e72e4f540a19d86fb37924d60d8
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/better-benchmark/bencher.rb
@@ -53,7 +53,7 @@ def initialize( argv )
end
def one_run
- system "#{@executable} #{ @executable_args.join(' ') }" or exit $?
+ system "#{@executable} #{ @executable_args.join(' ') }" or exit $?.to_i
end
def time_one_run
@@ -73,16 +73,16 @@ def run
@iterations.times do
if @test_working_copy
- system "git stash -q" or exit $?
+ system "git stash -q" or exit $?.to_i
else
- system "git checkout #{@r1}" or exit $?
+ system "git checkout #{@r1}" or exit $?.to_i
end
times1 << time_one_run
if @test_working_copy
- system "git stash pop -q" or exit $?
+ system "git stash pop -q" or exit $?.to_i
else
- system "git checkout #{@r2}" or exit $?
+ system "git checkout #{@r2}" or exit $?.to_i
end
times2 << time_one_run
end
@@ -92,4 +92,4 @@ def run
)
end
end
-end
+end

0 comments on commit 6d3dbf1

Please sign in to comment.