From 105a9e036c7f73913f2910858c1e6afce23378e8 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 16 Jun 2011 22:47:28 +0000 Subject: * 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 --- lib/benchmark.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/benchmark.rb b/lib/benchmark.rb index d2d2dcfaea..5ca9db1661 100644 --- a/lib/benchmark.rb +++ b/lib/benchmark.rb @@ -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 +, -, + # *, / + # def memberwise(op, x) case x when Benchmark::Tms -- cgit v1.2.3