ruby-changes:20093
From: drbrain <ko1@a...>
Date: Fri, 17 Jun 2011 07:49:29 +0900 (JST)
Subject: [ruby-changes:20093] drbrain:r32140 (trunk): * lib/benchmark.rb: Document Benchmark::Tms#memberwise. Patch by
drbrain 2011-06-17 07:47:28 +0900 (Fri, 17 Jun 2011) New Revision: 32140 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32140 Log: * lib/benchmark.rb: Document Benchmark::Tms#memberwise. Patch by David Czarnecki. [Ruby 1.9 - Bug #4873] Modified files: trunk/ChangeLog trunk/lib/benchmark.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32139) +++ ChangeLog (revision 32140) @@ -1,3 +1,8 @@ +Fri Jun 17 07:46:50 2011 Eric Hodel <drbrain@s...> + + * 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@s...> * lib/prettyprint.rb: Improve documentation. Patch by Ysiad Index: lib/benchmark.rb =================================================================== --- lib/benchmark.rb (revision 32139) +++ lib/benchmark.rb (revision 32140) @@ -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 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/