summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-11 08:02:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-11 08:02:04 +0000
commit86c6af5873ae218a3fa92aed419de5b92653b9fb (patch)
tree40149bab7e1444f3ce2cd9517fede590dee6e4f1 /marshal.c
parent81930da895afee14918490b072593860cb12d09b (diff)
* marshal.c (w_object): module inclusion using extend() should
also be detected. * eval.c (rb_eval_cmd): cbase should not be NULL; it should be either ruby_wrapper or Object. * enum.c (enum_each_with_index): should return self. * process.c (proc_setpgrp): should return value for non-void function. * process.c (proc_getpgid): should raise exception if getpgid() return -1. * string.c (rb_str_ljust): should return a duplicated string. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 17d3a69..4bd7a35 100644
--- a/marshal.c
+++ b/marshal.c
@@ -485,11 +485,12 @@ w_object(obj, arg, limit)
VALUE klass = CLASS_OF(obj);
char *path;
- if (FL_TEST(klass, FL_SINGLETON)) {
+ while (FL_TEST(klass, FL_SINGLETON) || BUILTIN_TYPE(klass) == T_ICLASS) {
if (RCLASS(klass)->m_tbl->num_entries > 0 ||
RCLASS(klass)->iv_tbl->num_entries > 1) {
rb_raise(rb_eTypeError, "singleton can't be dumped");
}
+ klass = RCLASS(klass)->super;
}
path = rb_class2name(klass);
w_unique(path, arg);