* 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:
parent
463df2ceb9
commit
105a9e036c
@ -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>
|
Fri Jun 17 07:38:31 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/prettyprint.rb: Improve documentation. Patch by Ysiad
|
* lib/prettyprint.rb: Improve documentation. Patch by Ysiad
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
=begin
|
#--
|
||||||
#
|
|
||||||
# benchmark.rb - a performance benchmarking library
|
# benchmark.rb - a performance benchmarking library
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
@ -8,9 +7,8 @@
|
|||||||
#
|
#
|
||||||
# Documentation by Gotoken (original RD), Lyle Johnson (RDoc conversion), and
|
# Documentation by Gotoken (original RD), Lyle Johnson (RDoc conversion), and
|
||||||
# Gavin Sinclair (editing).
|
# Gavin Sinclair (editing).
|
||||||
|
#++
|
||||||
#
|
#
|
||||||
=end
|
|
||||||
|
|
||||||
# == Overview
|
# == Overview
|
||||||
#
|
#
|
||||||
# The Benchmark module provides methods for benchmarking Ruby code, giving
|
# The Benchmark module provides methods for benchmarking Ruby code, giving
|
||||||
@ -512,6 +510,15 @@ module Benchmark
|
|||||||
end
|
end
|
||||||
|
|
||||||
protected
|
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)
|
def memberwise(op, x)
|
||||||
case x
|
case x
|
||||||
when Benchmark::Tms
|
when Benchmark::Tms
|
||||||
|
Loading…
x
Reference in New Issue
Block a user