It looks like rcov won't cover an empty rescue clause. I posted a detailed bug report on http://eigenclass.org/hiki.rb?rcov-0.8.0. Awesome tool in general, however. THANKS!!!!!!! On 2/28/07, Mauricio Fernandez <mfp / acm.org> wrote: > On Wed, Feb 28, 2007 at 09:48:42PM +0900, Jan Friedrich wrote: > > Thanks for new version. But I get an error: > [...] > > 7 tests, 25 assertions, 0 failures, 0 errors > > (eval):229:in `method_missing': no id given (ArgumentError) > > from (eval):229:in `method_missing' > > from > > /usr/lib/ruby/gems/1.8/gems/rcov-0.8.0.1/lib/rcov/report.rb:36:in > > `initialize' > > from > > This was an interesting bug report, I've found a possible bug in Ruby > (new behavior introduced in 1.8.5) thanks to it. > > Here's the part of the story that relates to your problem; the Ruby build > (more precisely the stdlib) you're using predates this: > > Sat Jun 17 14:53:32 2006 Tanaka Akira <akr / m17n.org> > > * lib/pathname.rb: backport from 1.9. > (Kernel#Pathname): new method. > > (iow. you're probably using ruby < 1.8.5). > > There's a chance rcov will work if you apply this patch: > > Wed Feb 28 15:29:58 CET 2007 Mauricio Fernandez <mfp / acm.org> > * lib/rcov/report.rb: use Pathname.new instead of Pathname for compatibility with Ruby < 1.8.5. > diff -rN -u old-head/lib/rcov/report.rb new-head/lib/rcov/report.rb > --- old-head/lib/rcov/report.rb 2007-02-28 15:30:47.000000000 +0100 > +++ new-head/lib/rcov/report.rb 2007-02-28 15:30:47.000000000 +0100 > @@ -33,7 +33,7 @@ > @callsite_index = nil > > @mangle_filename = Hash.new{|h,base| > - h[base] = Pathname(base).cleanpath.to_s.gsub(%r{^\w:[/\\]}, "").gsub(/\./, "_").gsub(/[\\\/]/, "-") + ".html" > + h[base] = Pathname.new(base).cleanpath.to_s.gsub(%r{^\w:[/\\]}, "").gsub(/\./, "_").gsub(/[\\\/]/, "-") + ".html" > } > end > > > I'd be grateful if you could run rcov after applying the above patch and tell > me if it works. If so, 0.8.1 will follow shortly. > > The unit tests seem to indicate that cross-referenced reports might not work > under ruby <1.8.5, but the basic functionality (code coverage) does. I'll > document that. > > -- > Mauricio Fernandez - http://eigenclass.org - singular Ruby > ** Latest postings ** > More logical programming in Ruby: solving Einstein's riddle (Zebra puzzle) > http://eigenclass.org/hiki.rb?einstein-riddle-solved-in-ruby > Bounded space memoization, another new twist > http://eigenclass.org/hiki.rb?bounded-space-memoization > >