diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
commit | 8dfa6fb0a80d633d71987f06462823ca13b67be8 (patch) | |
tree | ccf92cc3af99d21f06a5a9c32d02e247abe74592 /lib/rss/rss.rb | |
parent | 4ded52b623ebd1b3de12db82f8b54cc156c1fd28 (diff) | |
download | ruby-8dfa6fb0a80d633d71987f06462823ca13b67be8.tar.gz |
* lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or
resource attribute in rdf:li.
* test/rss/test_parser.rb: added test for above change.
* lib/rss/dublincore.rb: reverted style.
* lib/rss/xmlparser.rb: normalized XMLParser class hierarchy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rss.rb')
-rw-r--r-- | lib/rss/rss.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index e53934f725..fbd134c9c9 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -1,7 +1,7 @@ require "time" class Time - class << Time + class << self unless respond_to?(:w3cdtf) def w3cdtf(date) if /\A\s* @@ -510,11 +510,8 @@ EOC if not_shift not_shift = false - else - begin - tag = tags.shift - rescue NameError - end + elsif tags + tag = tags.shift end if DEBUG @@ -551,11 +548,9 @@ EOC end else if elem[0] == tag - begin - if model[i+1][0] != elem[0] and tags.first == elem[0] - raise TooMuchTagError.new(elem[0], tag_name) - end - rescue NameError # for model[i+1][0] and tags.first + if model[i+1] and model[i+1][0] != elem[0] and + tags and tags.first == elem[0] + raise TooMuchTagError.new(elem[0], tag_name) end else raise MissingTagError.new(elem[0], tag_name) |