mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/rss.rb: 0.1.8 -> 0.1.9.
* test/rss/test_version.rb: followed the above change. * lib/rss/parser.rb: fixed a bug that handles unintended elements. Thanks to Takuo Yonezawa. [ruby-list:43841] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f5da26fc34
commit
3349fd5826
4 changed files with 13 additions and 8 deletions
|
|
@ -365,10 +365,10 @@ module RSS
|
|||
def start_else_element(local, prefix, attrs, ns)
|
||||
class_name = self.class.class_name(_ns(ns, prefix), local)
|
||||
current_class = @last_element.class
|
||||
next_class = nil
|
||||
begin
|
||||
if current_class.const_defined?(class_name)
|
||||
next_class = current_class.const_get(class_name)
|
||||
rescue NameError
|
||||
start_have_something_element(local, prefix, attrs, ns, next_class)
|
||||
else
|
||||
if !@do_validate or @ignore_unknown_element
|
||||
@proc_stack.push(nil)
|
||||
else
|
||||
|
|
@ -379,9 +379,6 @@ module RSS
|
|||
raise NotExpectedTagError.new(local, _ns(ns, prefix), parent)
|
||||
end
|
||||
end
|
||||
if next_class
|
||||
start_have_something_element(local, prefix, attrs, ns, next_class)
|
||||
end
|
||||
end
|
||||
|
||||
NAMESPLIT = /^(?:([\w:][-\w\d.]*):)?([\w:][-\w\d.]*)/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue