summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-19 13:26:56 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-19 13:26:56 +0000
commitb61d1549d43e4c0afa2367a22c979d215976bd3e (patch)
treec12c5fec5f2f5021b8c16037ff4f6dbfe552e69c /lib
parenta077e7cec404cf9588ed846a1f8b5cbfb9f8f4bb (diff)
* lib/soap/mapping/rubytypeFactory.rb: should not dump singleton class.
[ruby-dev:22588] c = class << Object.new; class C; self; end; end; SOAPMarshal.dump(c) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/soap/mapping/rubytypeFactory.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/soap/mapping/rubytypeFactory.rb b/lib/soap/mapping/rubytypeFactory.rb
index a447715add..f79bc78cc7 100644
--- a/lib/soap/mapping/rubytypeFactory.rb
+++ b/lib/soap/mapping/rubytypeFactory.rb
@@ -167,7 +167,7 @@ class RubytypeFactory < Factory
unless @allow_original_mapping
return nil
end
- if obj.name.empty?
+ if obj.to_s[0] == ?#
raise TypeError.new("Can't dump anonymous class #{ obj }.")
end
param = SOAPStruct.new(TYPE_CLASS)
@@ -178,7 +178,7 @@ class RubytypeFactory < Factory
unless @allow_original_mapping
return nil
end
- if obj.name.empty?
+ if obj.to_s[0] == ?#
raise TypeError.new("Can't dump anonymous module #{ obj }.")
end
param = SOAPStruct.new(TYPE_MODULE)