1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

object.c: deprecate Data

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-11-29 08:23:16 +00:00
parent 256c88861b
commit 684bdf6171
2 changed files with 7 additions and 2 deletions

4
NEWS
View file

@ -27,6 +27,10 @@ with all sufficient information, see the ChangeLog file or Redmine
* Array#append [Feature #12746]
* Array#prepend [Feature #12746]
* Data
* Now deprecated [Feature #3072]
* Dir
* Dir.glob provides new optional keyword argument, :base.

View file

@ -4076,11 +4076,12 @@ InitVM_Object(void)
/*
* 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);