summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-22 08:29:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-22 08:29:58 +0000
commit44cf56d6e70dbe06a160b004494ba40dd4cfb426 (patch)
tree10e665c60414c3070ce957e5c534e30ed499bc2d /marshal.c
parent4b4cad81e7d2bdc4750ea5043ce44bf37adb3997 (diff)
2000-06-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 4b385dc..19a06a9 100644
--- a/marshal.c
+++ b/marshal.c
@@ -397,7 +397,9 @@ w_object(obj, arg, limit)
char *path;
if (FL_TEST(klass, FL_SINGLETON)) {
- rb_raise(rb_eTypeError, "singleton can't be dumped");
+ if (RCLASS(klass)->m_tbl->num_entries > 0) {
+ rb_raise(rb_eTypeError, "singleton can't be dumped");
+ }
}
path = rb_class2name(klass);
w_unique(path, arg);