зеркало из https://github.com/github/ruby.git
* lib/soap/mapping/factory.rb: catch up with spec changes (return
Symbols instead of Strings). * lib/soap/mapping/mapping.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0fe72040e4
Коммит
61d521117a
|
@ -1,3 +1,10 @@
|
|||
Sat Feb 24 13:25:32 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* lib/soap/mapping/factory.rb: catch up with spec changes (return
|
||||
Symbols instead of Strings).
|
||||
|
||||
* lib/soap/mapping/mapping.rb: ditto.
|
||||
|
||||
Sat Feb 24 10:49:55 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* parse.y, node.h, compile.c: change node tree structure. a purpose
|
||||
|
|
|
@ -51,7 +51,7 @@ class Factory
|
|||
else
|
||||
# should we sort instance_variables?
|
||||
obj.instance_variables.each do |var|
|
||||
name = var.sub(/^@/, '')
|
||||
name = var.to_s.sub(/^@/, '')
|
||||
elename = Mapping.name2elename(name)
|
||||
node.add(elename,
|
||||
Mapping._obj2soap(obj.instance_variable_get(var), map))
|
||||
|
|
|
@ -186,7 +186,7 @@ module Mapping
|
|||
# ex. a.b => a.2eb
|
||||
#
|
||||
def self.name2elename(name)
|
||||
name.gsub(/([^a-zA-Z0-9:_\-]+)/n) {
|
||||
name.to_s.gsub(/([^a-zA-Z0-9:_\-]+)/n) {
|
||||
'.' << $1.unpack('H2' * $1.size).join('.')
|
||||
}.gsub(/::/n, '..')
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче