summaryrefslogtreecommitdiff
path: root/lib/wsdl/xmlSchema/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wsdl/xmlSchema/attribute.rb')
-rw-r--r--lib/wsdl/xmlSchema/attribute.rb7
1 files changed, 4 insertions, 3 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)