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 | 4d5513d4697170120a2068e18263d416d5cd9d8b (patch) | |
| tree | 6d1723d76ff18cb42093f13789963dbac3214a16 /lib/soap | |
| parent | 778687ab738e00eb1ca0c5630fc4c727adf3fdb5 (diff) | |
| download | ruby-4d5513d4697170120a2068e18263d416d5cd9d8b.tar.gz ruby-4d5513d4697170120a2068e18263d416d5cd9d8b.tar.xz ruby-4d5513d4697170120a2068e18263d416d5cd9d8b.zip | |
* lib: do not use __send__ to access private methods. [ruby-dev:26935]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap')
| -rw-r--r-- | lib/soap/mapping/mapping.rb | 2 | ||||
| -rw-r--r-- | lib/soap/rpc/driver.rb | 11 | ||||
| -rw-r--r-- | lib/soap/wsdlDriver.rb | 11 |
3 files changed, 13 insertions, 11 deletions
diff --git a/lib/soap/mapping/mapping.rb b/lib/soap/mapping/mapping.rb index 626df8c82..cc0e6ff9d 100644 --- a/lib/soap/mapping/mapping.rb +++ b/lib/soap/mapping/mapping.rb @@ -254,7 +254,7 @@ module Mapping def self.define_singleton_method(obj, name, &block) sclass = (class << obj; self; end) - sclass.__send__(:define_method, name, &block) + sclass.class_eval {define_method(name, &block)} end def self.get_attribute(obj, attr_name) diff --git a/lib/soap/rpc/driver.rb b/lib/soap/rpc/driver.rb index cb10ed92b..096a54f01 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 diff --git a/lib/soap/wsdlDriver.rb b/lib/soap/wsdlDriver.rb index 3431d5d67..edd069e4f 100644 --- a/lib/soap/wsdlDriver.rb +++ b/lib/soap/wsdlDriver.rb @@ -159,13 +159,14 @@ class WSDLDriver 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) { @servant.__send__(name) - }) + } if assignable - self.__send__(:define_method, name + '=', proc { |rhs| - @servant.__send__(name + '=', rhs) - }) + aname = name + '=' + define_method(aname) { |rhs| + @servant.__send__(aname, rhs) + } end end else |
