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

ruby-changes:14310

From: marcandre <ko1@a...>
Date: Mon, 21 Dec 2009 08:16:09 +0900 (JST)
Subject: [ruby-changes:14310] Ruby:r26136 (ruby_1_8): * object.c: Object#initialize accepts any number of arguments

marcandre	2009-12-21 08:15:57 +0900 (Mon, 21 Dec 2009)

  New Revision: 26136

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

  Log:
    * object.c: Object#initialize accepts any number of arguments [ruby-core:27080]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/object.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 26135)
+++ ruby_1_8/ChangeLog	(revision 26136)
@@ -1,3 +1,8 @@
+Mon Dec 21 08:15:31 2009  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* object.c: Object#initialize accepts any number of arguments
+	  [ruby-core:27080]
+
 Sun Dec 20 23:43:46 2009  NAKAMURA, Hiroshi  <nahi@r...>
 
 	* lib/net/http.rb (HTTPGenericRequest#send_request_with_body_stream):
Index: ruby_1_8/object.c
===================================================================
--- ruby_1_8/object.c	(revision 26135)
+++ ruby_1_8/object.c	(revision 26136)
@@ -650,6 +650,14 @@
  *        end
  */
 
+/*
+ * Document-method: initialize
+ *
+ * call-seq:
+ *    Object.new( *args )
+ *
+ * Returns a new Object. Arguments are ignored.
+ */
 
 /*
  * Not documented
@@ -2718,7 +2726,7 @@
     rb_mKernel = rb_define_module("Kernel");
     rb_include_module(rb_cObject, rb_mKernel);
     rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);
-    rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
+    rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, -1);
     rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
     rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
     rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);

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

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