From: noreply@... Date: 2006-11-28T18:52:12+09:00 Subject: [ ruby-Bugs-6934 ] Benchmark::Tms#add! missing block argument Bugs item #6934, was opened at 2006-11-28 04:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6934&group_id=426 Category: Core Group: 1.8.5 Status: Open Resolution: None Priority: 3 Submitted By: Kevin Ballard (kballard) Assigned to: Nobody (None) Summary: Benchmark::Tms#add! missing block argument Initial Comment: Just what the Summary says. Benchmark::Tms#add takes an argument &blk which it uses. Benchmark::Tms#add! is supposed to be the in-place version of #add, and it also uses the &blk argument, except the method signature doesn't actually define the &blk argument here, so trying to use #add! simply raises a NameError. irb(main):001:0> require 'benchmark' => true irb(main):002:0> t = Benchmark::Tms.new => # irb(main):003:0> t.add! { 3 + 2} NameError: undefined local variable or method `blk' for # from /opt/local/lib/ruby/1.8/benchmark.rb:440:in `add!' from (irb):3 Simply adding `(&blk)' to the end of the method signature for Benchmark::Tms#add! fixes the problem. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6934&group_id=426