diff options
Diffstat (limited to 'lib/rss/0.9.rb')
-rw-r--r-- | lib/rss/0.9.rb | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/lib/rss/0.9.rb b/lib/rss/0.9.rb index 467d57ba2d..4f03333d96 100644 --- a/lib/rss/0.9.rb +++ b/lib/rss/0.9.rb @@ -1,4 +1,4 @@ -require "rss/rss" +require "rss/parser" module RSS @@ -413,26 +413,22 @@ EOT end - if const_defined?(:BaseListener) - RSS09::ELEMENTS.each do |x| - BaseListener.install_get_text_element(x, nil, "#{x}=") - end + RSS09::ELEMENTS.each do |x| + BaseListener.install_get_text_element(x, nil, "#{x}=") end - if const_defined?(:ListenerMixin) - module ListenerMixin - private - def start_rss(tag_name, prefix, attrs, ns) - check_ns(tag_name, prefix, ns, nil) - - @rss = Rss.new(attrs['version'], @version, @encoding, @standalone) - @last_element = @rss - @proc_stack.push Proc.new { |text, tags| - @rss.validate_for_stream(tags) if @do_validate - } - end - + module ListenerMixin + private + def start_rss(tag_name, prefix, attrs, ns) + check_ns(tag_name, prefix, ns, nil) + + @rss = Rss.new(attrs['version'], @version, @encoding, @standalone) + @last_element = @rss + @proc_stack.push Proc.new { |text, tags| + @rss.validate_for_stream(tags) if @do_validate + } end + end end |