Data class should have documentation
This class is confusing without knowing where to lookup information. I've attached a patch that points developers to README.ext
I'm assigning this to zzak, hopefully if this is the wrong person to assign it to he can assign it to someone else.
- object.c: Document Data class [Bug #7890] Patch by Matthew Mongeau
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
#1 [ruby-core:52550] Updated by halogenandtoast (Matthew Mongeau) about 5 years ago
I have a lack of experience with redmine. I don't see my patch attached, so just incase:
--- object.c (revision 39327)
+++ object.c (working copy)
@@ -3115,6 +3115,12 @@
rb_cData = rb_define_class("Data", rb_cObject);
- * Document-class: Data
- * This is a recommended base class for use by C extensions using Data_Make_Struct/Data_Wrap_Struct, see README.EXT for details.
- */ + rb_cTrueClass = rb_define_class("TrueClass", rb_cObject); rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0); rb_define_alias(rb_cTrueClass, "inspect", "to_s");
#2 Updated by zzak (Zachary Scott) about 5 years ago
- Status changed from Open to Closed
#4 [ruby-core:52558] Updated by halogenandtoast (Matthew Mongeau) about 5 years ago
nobu (Nobuyoshi Nakada) wrote:
I've supposed removal of Data in Ruby level.
It's my understanding that a lot of people feel that way, might be worth deprecating because I'd be uncertain as to how many C extensions use this. I know ruby std-lib has it in curses, iconv, raddrinfo, stringio, tcltklib, and win32ole. The core has it in marshal, transcode, and error. I don't currently understand the functionality behind TypedData_Make_Struct and Data_Wrap_Struct so I'm not sure how these libraries would be affected.