diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-10 08:21:13 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-10 08:21:13 +0000 |
commit | 8098dd6c802db53a0e879efb7e48e75981f043d3 (patch) | |
tree | 96377ab531ba1336b6b63a5e2eb6382456312bcb /numeric.c | |
parent | 14129c8fa30055b25036e490c0b8d87ffcfa34b2 (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 'numeric.c')
-rw-r--r-- | numeric.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -91,8 +91,9 @@ static VALUE num_clone(x) VALUE x; { - /* Numerics are immutable values, which need not to copy */ - return x; + /* Numerics are immutable values, which should not be copied */ + rb_raise(rb_eTypeError, "can't clone %s", rb_class2name(CLASS_OF(x))); + return Qnil; /* not reached */ } static VALUE |