diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-28 15:19:56 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-28 15:19:56 +0000 |
commit | 46f6b2026802fcd227beaac78c8d29378a96dceb (patch) | |
tree | a0a8dee81799b7e8982387ff12dd7baded9dfa09 /lib/rss/2.0.rb | |
parent | 202bf6618f39f48e81b7bb3c67114a22c2eeda16 (diff) | |
download | ruby-46f6b2026802fcd227beaac78c8d29378a96dceb.tar.gz |
* lib/rss: rss/parser.rb is always required.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/2.0.rb')
-rw-r--r-- | lib/rss/2.0.rb | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/lib/rss/2.0.rb b/lib/rss/2.0.rb index e43947e400..fd6a242d21 100644 --- a/lib/rss/2.0.rb +++ b/lib/rss/2.0.rb @@ -123,26 +123,22 @@ EOT end - if const_defined?(:BaseListener) - RSS09::ELEMENTS.each do |x| - BaseListener.install_get_text_element(x, Rss::URI, "#{x}=") - end + RSS09::ELEMENTS.each do |x| + BaseListener.install_get_text_element(x, Rss::URI, "#{x}=") end - if const_defined?(:ListenerMixin) - module ListenerMixin - private - def start_rss(tag_name, prefix, attrs, ns) - check_ns(tag_name, prefix, ns, Rss::URI) - - @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, Rss::URI) + + @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 |