summaryrefslogtreecommitdiff
path: root/lib/rss/parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rss/parser.rb')
-rw-r--r--lib/rss/parser.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb
index 5edcf21e17..0c76d8fdff 100644
--- a/lib/rss/parser.rb
+++ b/lib/rss/parser.rb
@@ -391,8 +391,9 @@ 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
- if current_class.const_defined?(class_name) or
- current_class.constants.include?(class_name)
+ if class_name and
+ (current_class.const_defined?(class_name) or
+ current_class.constants.include?(class_name))
next_class = current_class.const_get(class_name)
start_have_something_element(local, prefix, attrs, ns, next_class)
else