mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/: use #__send__ instead of #send. * test/rss/: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d41bea59c4
commit
e85f8c7829
17 changed files with 111 additions and 99 deletions
|
|
@ -37,13 +37,13 @@ module RSS
|
|||
def initialize(*attrs)
|
||||
@do_validate = true
|
||||
ATTRIBUTES.each do |attr|
|
||||
self.send("#{attr}=", nil)
|
||||
__send__("#{attr}=", nil)
|
||||
end
|
||||
vars = ATTRIBUTES.dup
|
||||
vars.unshift(:do_validate)
|
||||
attrs.each do |name, value|
|
||||
if vars.include?(name.to_s)
|
||||
self.send("#{name}=", value)
|
||||
__send__("#{name}=", value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -53,8 +53,8 @@ module RSS
|
|||
if @href
|
||||
rv << %Q[<?xml-stylesheet]
|
||||
ATTRIBUTES.each do |name|
|
||||
if self.send(name)
|
||||
rv << %Q[ #{name}="#{h self.send(name)}"]
|
||||
if __send__(name)
|
||||
rv << %Q[ #{name}="#{h __send__(name)}"]
|
||||
end
|
||||
end
|
||||
rv << %Q[?>]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue