aboutsummaryrefslogtreecommitdiffstats
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
parenta077e7cec404cf9588ed846a1f8b5cbfb9f8f4bb (diff)
downloadruby-b61d1549d43e4c0afa2367a22c979d215976bd3e.tar.gz
* 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
-rw-r--r--ChangeLog6
-rw-r--r--lib/soap/mapping/rubytypeFactory.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e0ec2753fc..efb45d6bb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Feb 19 22:24:04 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
+
+ * 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)
+
Thu Feb 19 18:08:18 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
* ext/strscan/strscan.c: improved documentation
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)