diff --git a/ChangeLog b/ChangeLog index ef74d8fe70..f5b32a3063 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 17 07:46:50 2011 Eric Hodel + + * 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 * lib/prettyprint.rb: Improve documentation. Patch by Ysiad 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