diff --git a/ChangeLog b/ChangeLog index 2d2f2f4383..2db635cc54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 6 20:36:19 2007 Kouhei Sutou + + * lib/rss/rss.rb, lib/rss/parser.rb: followed current Ruby + specification. [ruby-dev:30274] + Tue Feb 6 20:29:44 2007 Kouhei Sutou * lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 96be12f748..a15e7446d1 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -218,7 +218,7 @@ module RSS def def_get_text_element(uri, name, file, line) register_uri(uri, name) - unless private_instance_methods(false).include?("start_#{name}") + unless private_instance_methods(false).include?("start_#{name}".to_sym) module_eval(<<-EOT, file, line) def start_#{name}(name, prefix, attrs, ns) uri = ns[prefix] diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index 77a8584884..52ca4db890 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -25,7 +25,7 @@ class Time end end - unless instance_methods.include?("w3cdtf") + unless method_defined?(:w3cdtf) alias w3cdtf iso8601 end end @@ -783,7 +783,7 @@ EOC def other_element(need_convert, indent='') rv = [] private_methods.each do |meth| - if /\A([^_]+)_[^_]+_elements?\z/ =~ meth and + if /\A([^_]+)_[^_]+_elements?\z/ =~ meth.to_s and self.class::NSPOOL.has_key?($1) res = __send__(meth, need_convert, indent) rv << res if /\A\s*\z/ !~ res