aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 9c0f6f31d6..4f11fceec3 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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