1
0
Fork 0
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:
nobu 2007-05-31 08:26:31 +00:00
parent 284565992f
commit 44475bb208
3 changed files with 9 additions and 4 deletions

View file

@ -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]