[MacRuby] #1020: RSS::Maker is throwing a TypeError
#1020: RSS::Maker is throwing a TypeError -----------------------------+---------------------------------------------- Reporter: nick@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- I'm currently looking at the HEAD of MacRuby, and I have an issue with RSS:Maker core lib. When it's required, it throws a TypeError: $ macirb -f irb(main):001:0> require 'rss/maker' TypeError: superclass mismatch for class RSS::Maker::RSS10::TaxonomyTopics I think this is leaving an inconsistent RSS setup, and causes the attached test script to crash, once the TypeError exception is caught. -- Ticket URL: <http://www.macruby.org/trac/ticket/1020> MacRuby <http://macruby.org/>
#1020: RSS::Maker is throwing a TypeError -----------------------------+---------------------------------------------- Reporter: nick@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): Interestingly, it behaves differently when disabling the rbos. {{{ $ /usr/local/bin/macruby -r rss/maker -e '' superclass mismatch for class RSS::Maker::RSS10::TaxonomyTopics (TypeError) $ VM_DISABLE_RBO=1 /usr/local/bin/macruby -r rss/maker -e '' undefined method `split' for nil:NilClass (NoMethodError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1020#comment:1> MacRuby <http://macruby.org/>
#1020: RSS::Maker is throwing a TypeError -----------------------------+---------------------------------------------- Reporter: nick@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by nick@…): I've tracked down the source of that split on nil problem, and it's RSS::Utils#get_file_and_line_from_caller , in rss/utils.rb. Now why 'caller' is nil is the next question! And why its exhibiting different behaviour when VM_DISABLE_RBO is enabled is yet another. -- Ticket URL: <http://www.macruby.org/trac/ticket/1020#comment:2> MacRuby <http://macruby.org/>
#1020: RSS::Maker is throwing a TypeError -----------------------------+---------------------------------------------- Reporter: nick@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by nick@…): I tried a naive patch to RSS::Utils#get_file_and_line_from_caller to cope with nil: {{{ return ["", 0] if caller[i] == nil }}} and continued to trace the problems through. We now get this: {{{ superclass mismatch for class RSS::Maker::RSS10::TaxonomyTopics (TypeError) }}} which seems to stem from '''rss/maker/taxonomy.rb''', on line 17 ( https://github.com/MacRuby/MacRuby/blob/trunk/lib/rss/maker/taxonomy.rb#L17 ). I've checked against ruby 1.9.2 and can't see anything significantly different in terms of the generated class hierarchy, contents of variables etc. I'm not entirely sure where to go from here, as the whole RSS code is a bit of a spaghetti mess of meta-programming. -- Ticket URL: <http://www.macruby.org/trac/ticket/1020#comment:3> MacRuby <http://macruby.org/>
#1020: RSS::Maker is throwing a TypeError -----------------------------+---------------------------------------------- Reporter: nick@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): I think that a better fix for the #caller thing is to simply remove the rss library from the AOT list, as the problem doesn't seem to happen when .rbo files are ignored. After that, the TypeError problem is still remaining. This one needs to be reduced somehow. -- Ticket URL: <http://www.macruby.org/trac/ticket/1020#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby