summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-11 21:23:27 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-11 21:23:27 +0000
commit8c7f9f5cdd0ade7442d4e341093ecf1b8e2f4690 (patch)
tree0f85787bc2a3e7f95a7ca300a34c62732b071ee7 /lib
parent5b0cef85ac90802cf7d0f9c8443c11054fc89d54 (diff)
merges r30817 from trunk into ruby_1_9_2.
-- * lib/benchmark.rb (Benchmark#bmbm): use ensure clause instead of Object#tap to restore STDOUT.sync. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/benchmark.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/benchmark.rb b/lib/benchmark.rb
index 8e7f778e2d..d06b434c65 100644
--- a/lib/benchmark.rb
+++ b/lib/benchmark.rb
@@ -281,8 +281,9 @@ module Benchmark
list.push [label, res]
}
- STDOUT.sync = sync
ary
+ ensure
+ STDOUT.sync = sync unless sync.nil?
end
#