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/wsdl | |
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/wsdl')
-rw-r--r-- | lib/wsdl/xmlSchema/attribute.rb | 7 | ||||
-rw-r--r-- | lib/wsdl/xmlSchema/element.rb | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/wsdl/xmlSchema/attribute.rb b/lib/wsdl/xmlSchema/attribute.rb index cfd4c68422..c82bd13bde 100644 --- a/lib/wsdl/xmlSchema/attribute.rb +++ b/lib/wsdl/xmlSchema/attribute.rb @@ -18,10 +18,11 @@ class Attribute < Info if RUBY_VERSION > "1.7.0" def attr_reader_ref(symbol) name = symbol.to_s - self.__send__(:define_method, name, proc { - instance_variable_get("@#{name}") || + iv = "@#{name}" + define_method(name) { + instance_variable_get(iv) || (refelement ? refelement.__send__(name) : nil) - }) + } end else def attr_reader_ref(symbol) diff --git a/lib/wsdl/xmlSchema/element.rb b/lib/wsdl/xmlSchema/element.rb index 584afe9dc6..4a144cd522 100644 --- a/lib/wsdl/xmlSchema/element.rb +++ b/lib/wsdl/xmlSchema/element.rb @@ -18,10 +18,11 @@ class Element < Info if RUBY_VERSION > "1.7.0" def attr_reader_ref(symbol) name = symbol.to_s - self.__send__(:define_method, name, proc { - instance_variable_get("@#{name}") || + iv = "@#{name}" + define_method(name) { + instance_variable_get(iv) || (refelement ? refelement.__send__(name) : nil) - }) + } end else def attr_reader_ref(symbol) |