Comment 7 for bug 675061

Revision history for this message
Brad Folkens (bfolkens) wrote : Re: [Bug 675061] Re: undefined method `match' for {}:Hash in itunes_duration=

Thanks a ton!

On Wed, Nov 17, 2010 at 8:47 PM, mathew <email address hidden> wrote:

> OK, it seems to be a change in REXML behavior. It used to pass nil when
> there were no attributes for an opened XML element, now it (at least
> sometimes) passes an empty list. So it's a more general problem than
> just the podcast module, I think.
>
> I've uploaded a patch which makes the common.rb code check for empty
> attribute lists rather than just nil, before dispatching. I'll push it
> out as a new gem release. Thanks again.
>
> --
> undefined method `match' for {}:Hash in itunes_duration=
> https://bugs.launchpad.net/bugs/675061
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Web Syndication for Ruby: Fix Committed
> Status in ruby-syndication trunk series: Fix Committed
>
> Bug description:
> Getting the following while trying to parse a podcast:
>
> undefined method `match' for {}:Hash
> /Users/bfolkens/.gems/gems/syndication-0.6.2/lib/syndication/podcast.rb:34:in
> `itunes_duration='
> /Users/bfolkens/.gems/gems/syndication-0.6.2/lib/syndication/common.rb:52:in
> `send'
> /Users/bfolkens/.gems/gems/syndication-0.6.2/lib/syndication/common.rb:52:in
> `tag_start'
> /Users/bfolkens/.gems/gems/syndication-0.6.2/lib/syndication/common.rb:236:in
> `tag_start'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:in
> `parse'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:201:in
> `parse_stream'
> /Users/bfolkens/.gems/gems/syndication-0.6.2/lib/syndication/common.rb:188:in
> `parse'
>
> Attached a patch, works and passes all tests, but I'm not sure if this is
> an "appropriate" fix.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ruby-syndication/+bug/675061/+subscribe
>