From c41a952564ed4ae98c644fc77f1a03206f327bb3 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 27 Aug 2002 08:31:08 +0000 Subject: * file.c (rb_find_file): $LOAD_PATH must not be empty. * file.c (rb_find_file_ext): ditto. * range.c (range_eq): class check should be based on range.class, instead of Range to work with Range.dup. * range.c (range_eql): ditto. * class.c (rb_mod_dup): need to preserve metaclass and flags. * object.c (rb_cstr_to_dbl): had a buffer overrun. * marshal.c (w_class): integrate singleton check into a funciton to follow DRY principle. * marshal.c (w_uclass): should check singleton method. * object.c (rb_obj_dup): dmark and dfree functions must be match for T_DATA type. * object.c (rb_obj_dup): class of the duped object must be match to the class of the original. * re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are not regular expression metacharacters. * time.c (time_s_alloc): use time_free instead of free (null check, also serves for type mark). * time.c (time_s_at): check dfree function too. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index 3c9a20e50..1bc23a76f 100644 --- a/numeric.c +++ b/numeric.c @@ -88,11 +88,11 @@ rb_num_coerce_bin(x, y) } static VALUE -num_clone(x) - VALUE x; +num_become(x, y) + VALUE x, y; { /* Numerics are immutable values, which should not be copied */ - rb_raise(rb_eTypeError, "can't clone %s", rb_class2name(CLASS_OF(x))); + rb_raise(rb_eTypeError, "can't copy %s", rb_class2name(CLASS_OF(x))); return Qnil; /* not reached */ } @@ -1630,7 +1630,7 @@ Init_Numeric() rb_include_module(rb_cNumeric, rb_mComparable); rb_define_method(rb_cNumeric, "coerce", num_coerce, 1); - rb_define_method(rb_cNumeric, "clone", num_clone, 0); + rb_define_method(rb_cNumeric, "become", num_become, 1); rb_define_method(rb_cNumeric, "+@", num_uplus, 0); rb_define_method(rb_cNumeric, "-@", num_uminus, 0); -- cgit