From 6e52d10fe63fa99b6bfb12e5abb232c1165c804f Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 19 May 2003 05:41:08 +0000 Subject: * object.c (init_copy): rename copy_object as initialize_copy, since it works as copy constructor. * eval.c (rb_add_method): initialize_copy should always be private, like initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index f27f99364f..dd1800027a 100644 --- a/re.c +++ b/re.c @@ -582,7 +582,7 @@ match_alloc(klass) } static VALUE -match_copy_object(obj, orig) +match_init_copy(obj, orig) VALUE obj, orig; { if (obj == orig) return obj; @@ -1482,7 +1482,7 @@ rb_reg_options(re) } static VALUE -rb_reg_copy_object(copy, re) +rb_reg_init_copy(copy, re) VALUE copy, re; { if (copy == re) return copy; @@ -1732,7 +1732,7 @@ Init_Regexp() rb_define_singleton_method(rb_cRegexp, "last_match", rb_reg_s_last_match, -1); rb_define_method(rb_cRegexp, "initialize", rb_reg_initialize_m, -1); - rb_define_method(rb_cRegexp, "copy_object", rb_reg_copy_object, 1); + rb_define_method(rb_cRegexp, "initialize_copy", rb_reg_init_copy, 1); rb_define_method(rb_cRegexp, "hash", rb_reg_hash, 0); rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1); rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1); @@ -1758,7 +1758,7 @@ Init_Regexp() rb_define_alloc_func(rb_cMatch, match_alloc); rb_undef_method(CLASS_OF(rb_cMatch), "new"); - rb_define_method(rb_cMatch, "copy_object", match_copy_object, 1); + rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1); rb_define_method(rb_cMatch, "size", match_size, 0); rb_define_method(rb_cMatch, "length", match_size, 0); rb_define_method(rb_cMatch, "offset", match_offset, 1); -- cgit v1.2.3