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 | 07eb740efe5172ed3c9a8fad84088d26d539da01 (patch) | |
| tree | ccf92cc3af99d21f06a5a9c32d02e247abe74592 /lib/rss/rss.rb | |
| parent | 8cdc3778294e77428b05f16ec7a60ff8d1f7775a (diff) | |
| download | ruby-07eb740efe5172ed3c9a8fad84088d26d539da01.tar.gz ruby-07eb740efe5172ed3c9a8fad84088d26d539da01.tar.xz ruby-07eb740efe5172ed3c9a8fad84088d26d539da01.zip | |
* 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: http://svn.ruby-lang.org/repos/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 e53934f72..fbd134c9c 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) |
