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

ruby-changes:48813

From: nobu <ko1@a...>
Date: Wed, 29 Nov 2017 17:23:22 +0900 (JST)
Subject: [ruby-changes:48813] nobu:r60930 (trunk): object.c: deprecate Data

nobu	2017-11-29 17:23:16 +0900 (Wed, 29 Nov 2017)

  New Revision: 60930

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60930

  Log:
    object.c: deprecate Data
    
    * object.c (InitVM_Object): Data is deprecated now.
      [Feature #3072]

  Modified files:
    trunk/NEWS
    trunk/object.c
Index: object.c
===================================================================
--- object.c	(revision 60929)
+++ object.c	(revision 60930)
@@ -4076,11 +4076,12 @@ InitVM_Object(void) https://github.com/ruby/ruby/blob/trunk/object.c#L4076
     /*
      * Document-class: Data
      *
-     * This is a recommended base class for C extensions using Data_Make_Struct
-     * or Data_Wrap_Struct, see doc/extension.rdoc for details.
+     * This is a deprecated class, base class for C extensions using
+     * Data_Make_Struct or Data_Wrap_Struct.
      */
     rb_cData = rb_define_class("Data", rb_cObject);
     rb_undef_alloc_func(rb_cData);
+    rb_deprecate_constant(rb_cObject, "Data");
 
     rb_cTrueClass = rb_define_class("TrueClass", rb_cObject);
     rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0);
Index: NEWS
===================================================================
--- NEWS	(revision 60929)
+++ NEWS	(revision 60930)
@@ -27,6 +27,10 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L27
   * Array#append  [Feature #12746]
   * Array#prepend  [Feature #12746]
 
+* Data
+
+  * Now deprecated [Feature #3072]
+
 * Dir
 
   * Dir.glob provides new optional keyword argument, :base.

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

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