Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #2464 from znz/benchmark-return-type
Browse files Browse the repository at this point in the history
Benchmark.#bm,benchmark の返り値更新
  • Loading branch information
znz committed Mar 2, 2021
2 parents 35dcfcc + 0e45552 commit b3b155a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions refm/api/src/benchmark.rd
Expand Up @@ -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]] メソッドの引数を簡略化したものです。

Expand All @@ -42,8 +42,6 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、
@param label_width ラベルの幅を指定します。
@param labels ブロックが [[c:Benchmark::Tms]] オブジェクトの配列を返す場合に指定します。

@return STDIN.sync の値を返すだけなので返り値に意味はありません。

例:

require 'benchmark'
Expand Down Expand Up @@ -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]] オブジェクトを生成し、それを引数として与えられたブロックを実行します。

Expand All @@ -155,9 +153,6 @@ Benchmark::Tms オブジェクトには to_s が定義されているので、
#@end
@param labels ブロックが [[c:Benchmark::Tms]] オブジェクトの配列を返す場合に指定します。

@return STDIN.sync の値を返すだけなので返り値に意味はありません。


=== フォーマット文字列

フォーマット文字列として以下が使用できます。
Expand Down

0 comments on commit b3b155a

Please sign in to comment.