mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/benchmark.rb (Benchmark::Job::item): avoid modifying the
argument unintentionally. [ruby-talk:253676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
284565992f
commit
44475bb208
3 changed files with 9 additions and 4 deletions
|
@ -331,7 +331,7 @@ module Benchmark
|
|||
#
|
||||
def item(label = "", &blk) # :yield:
|
||||
raise ArgmentError, "no block" unless block_given?
|
||||
label.concat ' '
|
||||
label += ' '
|
||||
w = label.length
|
||||
@width = w if @width < w
|
||||
@list.push [label, blk]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue