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
|
|
@ -70,7 +70,7 @@ module RSS
|
|||
if args.empty?
|
||||
@#{var_name}.first and @#{var_name}.first.value
|
||||
else
|
||||
ret = @#{var_name}.send("[]", *args)
|
||||
ret = @#{var_name}.__send__("[]", *args)
|
||||
if ret.is_a?(Array)
|
||||
ret.collect {|x| x.value}
|
||||
else
|
||||
|
|
@ -94,7 +94,7 @@ module RSS
|
|||
else
|
||||
new_val = Utils.new_with_value_if_need(#{klass_name}, new_val)
|
||||
end
|
||||
@#{var_name}.send("[]=", *(args[0..-2] + [new_val]))
|
||||
@#{var_name}.__send__("[]=", *(args[0..-2] + [new_val]))
|
||||
end
|
||||
end
|
||||
alias set_#{var_name} #{var_name}=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue