[前][次][番号順一覧][スレッド一覧]

ruby-changes:26315

From: nobu <ko1@a...>
Date: Thu, 13 Dec 2012 23:32:55 +0900 (JST)
Subject: [ruby-changes:26315] nobu:r38366 (trunk): * object.c (Init_Object): no needs to override with same method.

nobu	2012-12-13 23:32:40 +0900 (Thu, 13 Dec 2012)

  New Revision: 38366

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38366

  Log:
    * object.c (Init_Object): no needs to override with same method.

  Modified files:
    trunk/ChangeLog
    trunk/class.c
    trunk/object.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38365)
+++ ChangeLog	(revision 38366)
@@ -5,6 +5,7 @@ Thu Dec 13 23:14:17 2012  Shugo Maeda  < https://github.com/ruby/ruby/blob/trunk/ChangeLog#L5
 	  See [ruby-core:50871] for details.
 
 Thu Dec 13 23:10:52  Charlie Somerville  <charlie@c...>
+
 	* object.c (Init_Object): use rb_mod_init_copy for Class#initialize_copy
 	* class.c (rb_class_init_copy): rename to class_init_copy_check, performs type
 	  checks on arguments to prevent reinitialization of initialized class
Index: object.c
===================================================================
--- object.c	(revision 38365)
+++ object.c	(revision 38366)
@@ -3101,7 +3101,6 @@ Init_Object(void) https://github.com/ruby/ruby/blob/trunk/object.c#L3101
     rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
     rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
     rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
-    rb_define_method(rb_cClass, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */
     rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
     rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
     rb_undef_method(rb_cClass, "extend_object");
Index: class.c
===================================================================
--- class.c	(revision 38365)
+++ class.c	(revision 38366)
@@ -177,7 +177,7 @@ class_init_copy_check(VALUE clone, VALUE https://github.com/ruby/ruby/blob/trunk/class.c#L177
 VALUE
 rb_mod_init_copy(VALUE clone, VALUE orig)
 {
-    if(RB_TYPE_P(clone, T_CLASS)) {
+    if (RB_TYPE_P(clone, T_CLASS)) {
 	class_init_copy_check(clone, orig);
     }
     rb_obj_init_copy(clone, orig);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]