Sharon Rosner
10/23/2007 2:16:00 PM
> I'm having a strange behavior when using RSS::Parser after requiring
> the sequel gem. After doing a require 'sequel', the number of news
> items is always 0. The script below is a small test which reads a rss
> feed with 6 items and prints the number of news items parsed. The
> first puts is after requiring 'rss', and the last puts is after
> requiring 'sequel'.
I've traced this problem down to the ruby2ruby gem, which is used by
Sequel. The Ruby2Ruby code contains the following trick:
class NilClass # Objective-C trick
def method_missing(msg, *args, &block)
nil
end
end
Try to add this bit to your code instead of requiring Sequel and
you'll see the same behavior. It seems the RSS parser relies on nil
raising an error for invalid calls, and the monkey patch for
NilClass#method_missing screws things up.
I suggest you contact Ryan Davis, the author of Ruby2Ruby, for further
help.
best
Sharon