diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-19 05:41:08 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-19 05:41:08 +0000 |
commit | 7c202937fa47f2b65a060f66e83042e151d97aeb (patch) | |
tree | 317cda44160a93678e8b530700ce4a2e17e682ed /re.c | |
parent | b1b809d7211b9b34c4e824f63202419b36096f9f (diff) | |
download | ruby-7c202937fa47f2b65a060f66e83042e151d97aeb.tar.gz ruby-7c202937fa47f2b65a060f66e83042e151d97aeb.tar.xz ruby-7c202937fa47f2b65a060f66e83042e151d97aeb.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |