summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-10 06:23:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-10 06:23:44 +0000
commit60b2446bea0297c47f56deb308c29a5c1af64cc9 (patch)
tree2bcb6184518b5e93ec49a03b275258a817511abd /object.c
parent4dcd8a95c7acf13a87283c11f72f7a8a7ad15019 (diff)
* sprintf.c (rb_f_sprintf): preceding ".." for negative numbers
still left; removed. * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec for example "%5.3d". * process.c (Init_process): add Process.exit and Process.abort * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant UTF-8 sequences. * process.c (last_status_set): add pid attribute to Process::Status. * pack.c (uv_to_utf8): limit maximum length of the encoded string to 6 bytes, even when the platform supports 8 bytes long integers. * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. * object.c (copy_object): use "copy_object" method, not "become". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/object.c b/object.c
index 06c748a..7eed51b 100644
--- a/object.c
+++ b/object.c
@@ -33,7 +33,7 @@ VALUE rb_cSymbol;
static ID eq, eql;
static ID inspect;
-static ID become;
+static ID copy_obj;
static ID alloc;
VALUE
@@ -115,7 +115,7 @@ copy_object(dest, obj)
}
RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
- rb_funcall(dest, become, 1, obj);
+ rb_funcall(dest, copy_obj, 1, obj);
if (FL_TEST(obj, FL_EXIVAR)) {
rb_copy_generic_ivar(dest, obj);
}
@@ -167,13 +167,13 @@ rb_obj_dup(obj)
}
VALUE
-rb_obj_become(obj, orig)
+rb_obj_copy_object(obj, orig)
VALUE obj, orig;
{
if (obj == orig) return obj;
rb_check_frozen(obj);
if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
- rb_raise(rb_eTypeError, "become should take same class object");
+ rb_raise(rb_eTypeError, "copy_object should take same class object");
}
return obj;
}
@@ -1333,7 +1333,7 @@ Init_Object()
rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);
- rb_define_method(rb_mKernel, "become", rb_obj_become, 1);
+ rb_define_method(rb_mKernel, "copy_object", rb_obj_copy_object, 1);
rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);
rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);
@@ -1470,5 +1470,5 @@ Init_Object()
eq = rb_intern("==");
eql = rb_intern("eql?");
inspect = rb_intern("inspect");
- become = rb_intern("become");
+ copy_obj = rb_intern("copy_object");
}