зеркало из https://github.com/github/ruby.git
* 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/trunk@30817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
afe7aac47b
Коммит
b50d85ebc6
|
@ -1,3 +1,8 @@
|
|||
Mon Feb 7 22:56:16 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||
|
||||
* lib/benchmark.rb (Benchmark#bmbm): use ensure clause instead of
|
||||
Object#tap to restore STDOUT.sync.
|
||||
|
||||
Mon Feb 7 22:34:20 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/net/http.rb (Net::HTTP#connect): support SNI (Server Name
|
||||
|
|
|
@ -266,9 +266,9 @@ module Benchmark
|
|||
GC.start
|
||||
print label.ljust(width)
|
||||
Benchmark.measure(&item).tap { |res| print res.format }
|
||||
}.tap {
|
||||
STDOUT.sync = sync
|
||||
}
|
||||
ensure
|
||||
STDOUT.sync = sync unless sync.nil?
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче