Bugs item #21816, was opened at 2008-09-04 21:28
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=21816&group_id=2014
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Suraj Kurapati (snk)
Assigned to: Nobody (None)
Summary: JRuby 1.1.4 with rcov-0.8.1.2.0-java.gem
Initial Comment:
Hello,
When using Rcov with JRuby on Windows, Rcov crashes when trying to open the
following filename for writing:
"coverage/file:-C:-Program
Files-jruby-1_1_4-lib-jruby_jar!-jruby-path_helper_rb.html"
This is because Windows is interpreting the ':' colon symbols in the filename.
To fix this, change the following code in lib/rcov/report.rb from:
@mangle_filename = Hash.new{|h,base|
h[base] = Pathname.new(base).cleanpath.to_s.gsub(%r{^\w:[/\]},
"").tr(".", "_").gsub(/[\\/:]/, "-") + ".html"
}
To:
@mangle_filename = Hash.new{|h,base|
h[base] = Pathname.new(base).cleanpath.to_s.gsub(%r{^\w:[/\]},
"").gsub(/\./, "_").gsub(/[\\/]/, "-") + ".html"
}
Another problem that occurs is Rcov crashes when coercing a NIL into a Fixnum
in lib/rcov/rcov.rb:654 in the aggregate_data() method. Change that line from:
cov_arr.each_with_index{|x,i| dest[i] += x}
to:
cov_arr.each_with_index{|x,i| dest[i] += x.to_i}
Thanks.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=21816&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel