* lib/benchmark.rb: Document Benchmark::Tms#memberwise. Patch by

David Czarnecki.  [Ruby 1.9 - Bug #4873]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-06-16 22:47:28 +00:00
Родитель 463df2ceb9
Коммит 105a9e036c
2 изменённых файлов: 16 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jun 17 07:46:50 2011 Eric Hodel <drbrain@segment7.net>
* lib/benchmark.rb: Document Benchmark::Tms#memberwise. Patch by
David Czarnecki. [Ruby 1.9 - Bug #4873]
Fri Jun 17 07:38:31 2011 Eric Hodel <drbrain@segment7.net>
* lib/prettyprint.rb: Improve documentation. Patch by Ysiad

Просмотреть файл

@ -1,5 +1,4 @@
=begin
#
#--
# benchmark.rb - a performance benchmarking library
#
# $Id$
@ -8,9 +7,8 @@
#
# Documentation by Gotoken (original RD), Lyle Johnson (RDoc conversion), and
# Gavin Sinclair (editing).
#++
#
=end
# == Overview
#
# The Benchmark module provides methods for benchmarking Ruby code, giving
@ -512,6 +510,15 @@ module Benchmark
end
protected
#
# Returns a new Tms object obtained by memberwise operation +op+
# of the individual times for this Tms object with those of the other
# Tms object.
#
# +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
# <tt>*</tt>, <tt>/</tt>
#
def memberwise(op, x)
case x
when Benchmark::Tms