lib/soap/mapping/factory.rb in rubyjedi-soap4r-1.5.8.20100619003610 vs lib/soap/mapping/factory.rb in rubyjedi-soap4r-2.0.2.1
- old
+ new
@@ -1,6 +1,6 @@
-# encoding: ASCII-8BIT
+# encoding: UTF-8
# SOAP4R - Mapping factory.
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
@@ -36,10 +36,10 @@
setiv2struct(obj, node, map)
end
end
def setiv2soap(node, obj, map)
- if obj.class.class_variables.include?('@@schema_element')
+ if obj.class.class_variable_defined?('@@schema_element')
setdefinediv2soap(node, obj, map)
else
# should we sort instance_variables? how?
obj.instance_variables.each do |var|
name = var.to_s.sub(/^@/, '')