1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rss/rss.rb, lib/rss/parser.rb: followed current Ruby

specification. [ruby-dev:30274]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2007-02-06 11:38:13 +00:00
parent cbcb626ee5
commit 8bc63849d5
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 6 20:36:19 2007 Kouhei Sutou <kou@cozmixng.org>
* lib/rss/rss.rb, lib/rss/parser.rb: followed current Ruby
specification. [ruby-dev:30274]
Tue Feb 6 20:29:44 2007 Kouhei Sutou <kou@cozmixng.org> Tue Feb 6 20:29:44 2007 Kouhei Sutou <kou@cozmixng.org>
* lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for * lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for

View file

@ -218,7 +218,7 @@ module RSS
def def_get_text_element(uri, name, file, line) def def_get_text_element(uri, name, file, line)
register_uri(uri, name) 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) module_eval(<<-EOT, file, line)
def start_#{name}(name, prefix, attrs, ns) def start_#{name}(name, prefix, attrs, ns)
uri = ns[prefix] uri = ns[prefix]

View file

@ -25,7 +25,7 @@ class Time
end end
end end
unless instance_methods.include?("w3cdtf") unless method_defined?(:w3cdtf)
alias w3cdtf iso8601 alias w3cdtf iso8601
end end
end end
@ -783,7 +783,7 @@ EOC
def other_element(need_convert, indent='') def other_element(need_convert, indent='')
rv = [] rv = []
private_methods.each do |meth| 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) self.class::NSPOOL.has_key?($1)
res = __send__(meth, need_convert, indent) res = __send__(meth, need_convert, indent)
rv << res if /\A\s*\z/ !~ res rv << res if /\A\s*\z/ !~ res