diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-02 14:53:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-02 14:53:02 +0000 |
commit | cd5c822ac8adaa4af4daf9166c1e5714662c9c9a (patch) | |
tree | 7194c55210572d21506dce99d32577db423d8f61 /lib/soap/rpc | |
parent | c6cdbda54f2ebb50d8e2040392f62f7485112600 (diff) | |
download | ruby-cd5c822ac8adaa4af4daf9166c1e5714662c9c9a.tar.gz |
* lib: do not use __send__ to access private methods. [ruby-dev:26935]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap/rpc')
-rw-r--r-- | lib/soap/rpc/driver.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/soap/rpc/driver.rb b/lib/soap/rpc/driver.rb index cb10ed92b5..096a54f01a 100644 --- a/lib/soap/rpc/driver.rb +++ b/lib/soap/rpc/driver.rb @@ -26,13 +26,14 @@ class Driver if RUBY_VERSION >= "1.7.0" def __attr_proxy(symbol, assignable = false) name = symbol.to_s - self.__send__(:define_method, name, proc { + define_method(name) { @proxy.__send__(name) - }) + } if assignable - self.__send__(:define_method, name + '=', proc { |rhs| - @proxy.__send__(name + '=', rhs) - }) + aname = name + '=' + define_method(aname) { |rhs| + @proxy.__send__(aname, rhs) + } end end else |