Package: libruby1.8
Version: 1.8.6.111-3
Severity: normal
Tags: upstream patch
Hi,
When using rcov on an up-to-date sid box, I get the following crash:
----------------------8<-------------------------8<---------------------
47 tests, 85 assertions, 0 failures, 0 errors
/usr/lib/ruby/1.8/rexml/text.rb:292:in `normalize': private method `gsub'
called for 0:Fixnum (NoMethodError)
from /usr/lib/ruby/1.8/rexml/element.rb:1085:in `[]='
from /usr/lib/ruby/1.8/rexml/element.rb:586:in `add_attribute'
from (eval):490:in `table_'
from (eval):490:in `each'
from (eval):490:in `table_'
from (eval):490:in `each'
from (eval):490:in `table_'
from /usr/lib/ruby/1.8/rcov/report.rb:702:in `format_overview'
... 62 levels...
from /usr/lib/ruby/1.8/rcov.rb:628:in `each'
from /usr/lib/ruby/1.8/rcov.rb:628:in `dump_coverage_info'
from /usr/bin/rcov:405
from /usr/lib/ruby/1.8/test/unit.rb:278
----------------------8<-------------------------8<---------------------
As discussed in
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/275177, the problem
is that REXML stopped accepting non-String objects as content.
The following patch against /usr/lib/ruby/1.8/rexml/text.rb fixes the problem:
----------------------8<-------------------------8<---------------------
--- text.rb.orig 2008-01-28 01:48:11.316310817 -0300
+++ text.rb 2008-01-28 01:48:28.162089584 -0300
@@ -286,7 +286,7 @@
EREFERENCE = /&(?!#{Entity::NAME};)/
# Escapes all possible entities
def Text::normalize( input, doctype=nil, entity_filter=nil )
- copy = input
+ copy = input.to_s
# Doing it like this rather than in a loop improves the speed
#copy = copy.gsub( EREFERENCE, '&' )
copy = copy.gsub( "&", "&" )
----------------------8<-------------------------8<---------------------
You can see that this change was already applied in upstream's trunk, cf:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rexml/text.rb?r1=14826&r2=15141
It would be nice if this patch could be included in the package.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.23-1-686 (SMP w/1 CPU core)
Locale: LANG=pt_BR.utf8, LC_CTYPE=pt_BR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libruby1.8 depends on:
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libncurses5 5.6+20080105-1 Shared libraries for terminal hand
ii zlib1g 1:1.2.3.3.dfsg-11 compression library - runtime
libruby1.8 recommends no packages.
-- no debconf information
--
Antonio Terceiro <[EMAIL PROTECTED]>
http://people.softwarelivre.org/~terceiro/
GnuPG ID: 0F9CB28F
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]