[前][次][番号順一覧][スレッド一覧]

ruby-changes:52540

From: nobu <ko1@a...>
Date: Sat, 15 Sep 2018 21:45:53 +0900 (JST)
Subject: [ruby-changes:52540] nobu:r64752 (trunk): Work on Benchmark::Tms documentation [ci skip]

nobu	2018-09-15 21:45:46 +0900 (Sat, 15 Sep 2018)

  New Revision: 64752

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64752

  Log:
    Work on Benchmark::Tms documentation [ci skip]
    
    [ruby-core:88874] [Bug #15080]
    
    From: Richard Wardin <shalmezad@g...>

  Modified files:
    trunk/lib/benchmark.rb
Index: lib/benchmark.rb
===================================================================
--- lib/benchmark.rb	(revision 64751)
+++ lib/benchmark.rb	(revision 64752)
@@ -439,6 +439,9 @@ module Benchmark https://github.com/ruby/ruby/blob/trunk/lib/benchmark.rb#L439
 
     #
     # An in-place version of #add.
+    # Changes the times of this Tms object by making it the sum of the times
+    # for this Tms object, plus the time required to execute
+    # the code block (+blk+).
     #
     def add!(&blk)
       t = Benchmark.measure(&blk)
@@ -452,7 +455,7 @@ module Benchmark https://github.com/ruby/ruby/blob/trunk/lib/benchmark.rb#L455
 
     #
     # Returns a new Tms object obtained by memberwise summation
-    # of the individual times for this Tms object with those of the other
+    # of the individual times for this Tms object with those of the +other+
     # Tms object.
     # This method and #/() are useful for taking statistics.
     #
@@ -460,20 +463,20 @@ module Benchmark https://github.com/ruby/ruby/blob/trunk/lib/benchmark.rb#L463
 
     #
     # Returns a new Tms object obtained by memberwise subtraction
-    # of the individual times for the other Tms object from those of this
+    # of the individual times for the +other+ Tms object from those of this
     # Tms object.
     #
     def -(other); memberwise(:-, other) end
 
     #
     # Returns a new Tms object obtained by memberwise multiplication
-    # of the individual times for this Tms object by _x_.
+    # of the individual times for this Tms object by +x+.
     #
     def *(x); memberwise(:*, x) end
 
     #
     # Returns a new Tms object obtained by memberwise division
-    # of the individual times for this Tms object by _x_.
+    # of the individual times for this Tms object by +x+.
     # This method and #+() are useful for taking statistics.
     #
     def /(x); memberwise(:/, x) end
@@ -529,7 +532,7 @@ module Benchmark https://github.com/ruby/ruby/blob/trunk/lib/benchmark.rb#L532
     #
     # 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.
+    # Tms object (+x+).
     #
     # +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
     # <tt>*</tt>, <tt>/</tt>

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]