From 0e45552c348140020986c7bfe3427a3f1207ec07 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Sun, 28 Feb 2021 00:17:46 +0900 Subject: [PATCH] =?UTF-8?q?Benchmark.#bm,benchmark=20=E3=81=AE=E8=BF=94?= =?UTF-8?q?=E3=82=8A=E5=80=A4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/ruby/ruby/commit/4870feb31a6625dcbf8817ccf16294bb3f3737e1#diff-630499446570a9b1bd6b6efc1534eb42bf50e875f3dbe81282ee535433b4f158R178 の変更で ruby-1.9.3-preview1 から返り値が修正されているため。 --- refm/api/src/benchmark.rd | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/refm/api/src/benchmark.rd b/refm/api/src/benchmark.rd index 5ecd3c3f0c..0da7b84527 100644 --- a/refm/api/src/benchmark.rd +++ b/refm/api/src/benchmark.rd @@ -33,7 +33,7 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、 ---- bm(label_width = 0, *labels) {|rep| ... } -> bool +--- bm(label_width = 0, *labels) {|rep| ... } -> [Benchmark::Tms] [[m:Benchmark.#benchmark]] メソッドの引数を簡略化したものです。 @@ -42,8 +42,6 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、 @param label_width ラベルの幅を指定します。 @param labels ブロックが [[c:Benchmark::Tms]] オブジェクトの配列を返す場合に指定します。 -@return STDIN.sync の値を返すだけなので返り値に意味はありません。 - 例: require 'benchmark' @@ -137,7 +135,7 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、 sort! 12.959000 0.010000 12.969000 ( 13.793000) sort 12.007000 0.000000 12.007000 ( 12.791000) ---- benchmark(caption = "", label_width = nil, fmtstr = nil, *labels){|rep| ...} -> bool +--- benchmark(caption = "", label_width = nil, fmtstr = nil, *labels){|rep| ...} -> [Benchmark::Tms] [[c:Benchmark::Report]] オブジェクトを生成し、それを引数として与えられたブロックを実行します。 @@ -155,9 +153,6 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、 #@end @param labels ブロックが [[c:Benchmark::Tms]] オブジェクトの配列を返す場合に指定します。 -@return STDIN.sync の値を返すだけなので返り値に意味はありません。 - - === フォーマット文字列 フォーマット文字列として以下が使用できます。