Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195505 - dev-lang/ruby-1.8.6_p110-r1 has broken rexml implementation
Summary: dev-lang/ruby-1.8.6_p110-r1 has broken rexml implementation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
: 202426 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-11 14:15 UTC by Hans de Graaff
Modified: 2007-12-17 19:54 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ruby-1.8.6_p110-r2.ebuild.patch (ruby-1.8.6_p110-r2.ebuild.patch,410 bytes, patch)
2007-10-11 18:13 UTC, Richard Brown (RETIRED)
Details | Diff
ruby-1.8.6_p110-rexml.patch (ruby-1.8.6_p110-rexml.patch,11.88 KB, patch)
2007-10-11 18:16 UTC, Richard Brown (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev Security 2007-10-11 14:15:06 UTC
Creating an rcov report with ruby-1.8.6_p110-r1 runs into errors, at least one of which is a simple variable name mismatch. In any case the code is not backwards compatible as evidenced by this crash:

/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:1084: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/gems/1.8/gems/rcov-0.8.0.2/lib/rcov/report.rb:702:in `format_overview'
         ... 61 levels...
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `dump_coverage_info'
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `each'
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `dump_coverage_info'
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.0.2/bin/rcov:405


Reverting to dev-lang/ruby-1.8.6-r1 fixes things.
Comment 1 cyril mougel 2007-10-11 17:35:05 UTC
I have the same issue when I use xmpp4r.

Now dev-ruby/xmpp4r is unusable with this Ruby version.

    <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' xml:lang='en' version='1.0' >
19:34:01 EXCEPTION:
    NoMethodError
    private method `gsub' called for nil:NilClass
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/rexmladdons.rb:854:in `normalize'
    /usr/lib/ruby/1.8/rexml/attribute.rb:123:in `to_s'
    /usr/lib/ruby/1.8/rexml/attribute.rb:109:in `to_string'
    /usr/lib/ruby/1.8/rexml/attribute.rb:165:in `write'
    /usr/lib/ruby/1.8/rexml/formatters/default.rb:68:in `write_element'
    /usr/lib/ruby/1.8/rexml/element.rb:1001:in `each_attribute'
    /usr/lib/ruby/1.8/rexml/element.rb:999:in `each_value'
    /usr/lib/ruby/1.8/rexml/element.rb:999:in `each_attribute'
    /usr/lib/ruby/1.8/rexml/formatters/default.rb:66:in `write_element'
    /usr/lib/ruby/1.8/rexml/formatters/default.rb:31:in `write'
    /usr/lib/ruby/1.8/rexml/node.rb:33:in `to_s'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:188:in `receive_nonthreaded'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:181:in `receive'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/streamparser.rb:48:in `parse'
    /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb:128:in `call'
    /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb:128:in `parse'
    /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb:128:in `each'
    /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb:128:in `parse'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/streamparser.rb:71:in `parse'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:76:in `start'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:74:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:74:in `new'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/stream.rb:74:in `start'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/connection.rb:85:in `start'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/client.rb:88:in `start'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/connection.rb:54:in `connect'
    /usr/lib/ruby/gems/1.8/gems/xmpp4r-0.3.1/lib/xmpp4r/client.rb:73:in `connect'
    (irb):5:in `irb_binding'
    /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
    /usr/lib/ruby/1.8/irb/workspace.rb:52
Comment 2 Richard Brown (RETIRED) gentoo-dev 2007-10-11 18:13:24 UTC
Created attachment 133173 [details, diff]
ruby-1.8.6_p110-r2.ebuild.patch
Comment 3 Richard Brown (RETIRED) gentoo-dev 2007-10-11 18:16:19 UTC
Created attachment 133178 [details, diff]
ruby-1.8.6_p110-rexml.patch

This is the latest rexml patch for ruby-1.8.6, it may or may not fix your issues, it will cause some of the "rubytests" tests to fail.
Comment 4 Hans de Graaff gentoo-dev Security 2007-10-12 06:13:54 UTC
This patch doesn't fix my problems, I'm still getting the same errors.

I'm wondering, though, if this is simply a change in interface. The problem I'm having is with arguments that are passed as fixnums. I had some success yesterday in converting these to strings. Still, doing such an interface change in a minor version bump without deprecating it first is messy to say the least.

Monkey-patching the fixnums to strings in rcov eventually leads me to:

/usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:131:in `[]': no implicit conversion from nil to integer (TypeError)
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:131:in `wrap'
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:131:in `wrap'
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:90:in `write_text'
        from /usr/lib64/ruby/1.8/rexml/formatters/default.rb:50:in `write'
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:75:in `write_element'
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:73:in `each'
        from /usr/lib64/ruby/1.8/rexml/formatters/pretty.rb:73:in `write_element'
        from /usr/lib64/ruby/1.8/rexml/formatters/default.rb:31:in `write'
         ... 15 levels...
        from /usr/lib64/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `dump_coverage_info'
        from /usr/lib64/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `each'
        from /usr/lib64/ruby/gems/1.8/gems/rcov-0.8.0.2/lib/rcov.rb:628:in `dump_coverage_info'
        from /usr/lib64/ruby/gems/1.8/gems/rcov-0.8.0.2/bin/rcov:405

Sigh.
Comment 5 cyril mougel 2007-10-22 09:57:42 UTC
In Ruby lang mailling list this same problem is report. And a patch is commit 9 day ago:

http://groups.google.com/group/ruby-talk-google/browse_thread/thread/c2e2f3b9a6ffac50?hl=en
Comment 6 M. Edward Borasky 2007-11-18 01:12:14 UTC
(In reply to comment #5)
> In Ruby lang mailling list this same problem is report. And a patch is commit 9
> day ago:
> 
> http://groups.google.com/group/ruby-talk-google/browse_thread/thread/c2e2f3b9a6ffac50?hl=en
> 

There is now a ruby-1.8.6-p111 upstream -- shouldn't this bug be closed?
Comment 7 Hans de Graaff gentoo-dev Security 2007-11-18 08:02:23 UTC
(In reply to comment #6)

> There is now a ruby-1.8.6-p111 upstream -- shouldn't this bug be closed?

No, we could only close it when this version has been added to Gentoo's CVS. However, we already verified that the patches in p111 don't think all the problems reported here.

Comment 8 Hans de Graaff gentoo-dev Security 2007-11-23 11:36:32 UTC
The remaining problems have been fixed in rcov 0.8.1.2.0 which I've just added to CVS.
Comment 9 Hans de Graaff gentoo-dev Security 2007-12-17 19:54:46 UTC
*** Bug 202426 has been marked as a duplicate of this bug. ***