summaryrefslogtreecommitdiff
path: root/lib/wsdl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-02 14:53:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-02 14:53:02 +0000
commitcd5c822ac8adaa4af4daf9166c1e5714662c9c9a (patch)
tree7194c55210572d21506dce99d32577db423d8f61 /lib/wsdl
parentc6cdbda54f2ebb50d8e2040392f62f7485112600 (diff)
downloadruby-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.rb7
-rw-r--r--lib/wsdl/xmlSchema/element.rb7
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)