From ef4273db33a68360d537aa8a0696e4c26b5f3002 Mon Sep 17 00:00:00 2001 From: kou Date: Sun, 11 Feb 2007 13:11:02 +0000 Subject: [PATCH] * lib/rss/parser.rb (RSS::ListenerMixin::start_else_element): used const_defined? instead of constants.include?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/rss/parser.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 95346cee77..f28439c9be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Feb 11 22:10:08 2007 Kouhei Sutou + + * lib/rss/parser.rb (RSS::ListenerMixin::start_else_element): used + const_defined? instead of constants.include?. + Sun Feb 11 18:47:14 2007 Masaki Suketa * ext/win32ole/win32ole.c (ole_val2olevariantdata): diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index a15e7446d1..babf15f52c 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -330,7 +330,7 @@ module RSS def start_else_element(local, prefix, attrs, ns) class_name = self.class.class_name(ns[prefix], local) current_class = @last_element.class - if current_class.constants.include?(class_name) + if current_class.const_defined?(class_name) next_class = current_class.const_get(class_name) start_have_something_element(local, prefix, attrs, ns, next_class) else