diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 08:44:05 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 08:44:05 +0000 |
commit | f0e5162753d3e6fd644a4f6555e2acfd43abce60 (patch) | |
tree | 17c03351ecc7943e1baf9c5fa43074b7b5c015af /lib | |
parent | be0dff43dcc58f4f251460eb43d9d5b784e0c633 (diff) | |
download | ruby-f0e5162753d3e6fd644a4f6555e2acfd43abce60.tar.gz ruby-f0e5162753d3e6fd644a4f6555e2acfd43abce60.tar.xz ruby-f0e5162753d3e6fd644a4f6555e2acfd43abce60.zip |
* lib/rss/rss.rb: fixed a indentation bug.
* lib/rss/taxonomy.rb: fixed <taxo:topic> #to_s bug.
* test/rss/test_taxonomy.rb: added a #to_s test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rss/rss.rb | 4 | ||||
-rw-r--r-- | lib/rss/taxonomy.rb | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index d2b760448..7ccf1aefa 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -725,8 +725,8 @@ EOC private_methods.each do |meth| if /\A([^_]+)_[^_]+_elements?\z/ =~ meth and self.class::NSPOOL.has_key?($1) - res = __send__(meth, need_convert) - rv << "#{indent}#{res}" if /\A\s*\z/ !~ res + res = __send__(meth, need_convert, indent) + rv << res if /\A\s*\z/ !~ res end end rv.join("\n") diff --git a/lib/rss/taxonomy.rb b/lib/rss/taxonomy.rb index c89de64d3..3eb5b893a 100644 --- a/lib/rss/taxonomy.rb +++ b/lib/rss/taxonomy.rb @@ -163,7 +163,6 @@ module RSS def to_s(need_convert=true, indent=calc_indent) rv = tag(indent) do |next_indent| [ - link_element(need_convert, next_indent), other_element(need_convert, next_indent), ] end @@ -189,6 +188,12 @@ module RSS [@taxo_link, @taxo_topics] end + def _attrs + [ + ["#{RDF::PREFIX}:about", true, "about"] + ] + end + def _tags rv = [] rv << [TAXO_URI, "link"] unless @taxo_link.nil? |