From c0306157d9dbb12447ba5288b8a2db73b2beef11 Mon Sep 17 00:00:00 2001 From: kou Date: Fri, 13 Feb 2004 11:02:03 +0000 Subject: * test/rss/test_trackback.rb: added tests for TrackBack with RSS 2.0. * test/rss/common.rb: added methods make RSS 2.0. * lib/rss/trackback.rb: TrackBack API is decided. * lib/rss/rss.rb: RSS::VERSION 0.0.7 -> 0.0.8 * lib/rss/parser.rb, lib/rss/rss.rb: replaced $DEBUG by RSS::DEBUG. * lib/rss/2.0.rb: removed RSS 2.0 URI. Because RSS 2.0 doesn't have URI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rss/rss.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/rss/rss.rb') diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index 2dfc0d1ecc..d84b51472d 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -5,7 +5,9 @@ require "rss/converter" module RSS - VERSION = "0.0.7" + VERSION = "0.0.8" + + DEBUG = false class Error < StandardError; end @@ -363,6 +365,7 @@ EOC def initialize(do_validate=true) @converter = nil + @output_encoding = nil @do_validate = do_validate initialize_variables end @@ -393,6 +396,7 @@ EOC instance_eval("@#{variable_name} = nil") end initialize_have_children_elements + @content = "" if self.class.have_content? end def initialize_have_children_elements @@ -423,7 +427,7 @@ EOC end must_call_validators = self.class::must_call_validators tags = tag_filter(tags.dup) - p tags if $DEBUG + p tags if DEBUG self.class::NSPOOL.each do |prefix, uri| if tags.has_key?(uri) and !must_call_validators.has_key?(uri) meth = "#{prefix}_validate" @@ -463,7 +467,7 @@ EOC model.each_with_index do |elem, i| - if $DEBUG + if DEBUG p "before" p tags p elem @@ -478,7 +482,7 @@ EOC end end - if $DEBUG + if DEBUG p "mid" p count end @@ -523,7 +527,7 @@ EOC end end - if $DEBUG + if DEBUG p "after" p not_shift p do_redo -- cgit v1.2.3