summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-10 08:21:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-10 08:21:13 +0000
commit8098dd6c802db53a0e879efb7e48e75981f043d3 (patch)
tree96377ab531ba1336b6b63a5e2eb6382456312bcb /object.c
parent14129c8fa30055b25036e490c0b8d87ffcfa34b2 (diff)
* file.c (rb_stat_clone): should copy internal data too.
* numeric.c (num_clone): Numeric should not be copied by clone. * object.c (rb_obj_clone): should check immediate values. * parse.y (command): `yield' should take command_args. * parse.y (parse_quotedwords): %w(...) is not a string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/object.c b/object.c
index e2bc29b..b2580d9 100644
--- a/object.c
+++ b/object.c
@@ -94,6 +94,9 @@ rb_obj_clone(obj)
{
VALUE clone;
+ if (rb_special_const_p(obj)) {
+ rb_raise(rb_eTypeError, "can't clone %s", rb_class2name(CLASS_OF(obj)));
+ }
clone = rb_obj_alloc(RBASIC(obj)->klass);
CLONESETUP(clone,obj);
if (TYPE(clone) == T_OBJECT && ROBJECT(obj)->iv_tbl) {
@@ -587,10 +590,12 @@ rb_mod_cmp(mod, arg)
}
static VALUE
-rb_mod_initialize(argc, argv)
+rb_mod_initialize(argc, argv, module)
int argc;
VALUE *argv;
+ VALUE module;
{
+ rb_mod_module_eval(0, 0, module);
return Qnil;
}