ruby-changes:65920
From: Keith <ko1@a...>
Date: Thu, 22 Apr 2021 11:51:54 +0900 (JST)
Subject: [ruby-changes:65920] 4f39a35b60 (master): [ruby/benchmark] Add comment about terminating newline in captions; fix test method name.
https://git.ruby-lang.org/ruby.git/commit/?id=4f39a35b60 From 4f39a35b60de7fe80ace6978aae3346f0d76ced4 Mon Sep 17 00:00:00 2001 From: Keith Bennett <keithrbennett@g...> Date: Wed, 3 Mar 2021 15:13:30 -0500 Subject: [ruby/benchmark] Add comment about terminating newline in captions; fix test method name. https://github.com/ruby/benchmark/commit/02ce298d3e --- lib/benchmark.rb | 3 +++ test/benchmark/test_benchmark.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/benchmark.rb b/lib/benchmark.rb index 361bca3..79c782e 100644 --- a/lib/benchmark.rb +++ b/lib/benchmark.rb @@ -128,6 +128,9 @@ module Benchmark https://github.com/ruby/ruby/blob/trunk/lib/benchmark.rb#L128 # benchmark tests. Reserves +label_width+ leading spaces for # labels on each line. Prints +caption+ at the top of the # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # # Returns an array of Benchmark::Tms objects. # # If the block returns an array of diff --git a/test/benchmark/test_benchmark.rb b/test/benchmark/test_benchmark.rb index 3030bc5..ddd4a59 100644 --- a/test/benchmark/test_benchmark.rb +++ b/test/benchmark/test_benchmark.rb @@ -71,7 +71,7 @@ third --time-- --time-- --time-- ( --time--) https://github.com/ruby/ruby/blob/trunk/test/benchmark/test_benchmark.rb#L71 BENCH end - def test_benchmark_makes_extra_calcultations_with_an_Array_at_the_end_of_the_benchmark_and_show_the_result + def test_benchmark_makes_extra_calculations_with_an_Array_at_the_end_of_the_benchmark_and_show_the_result assert_equal(BENCHMARK_OUTPUT_WITH_TOTAL_AVG, capture_bench_output(:benchmark, Benchmark::CAPTION, 7, -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/