Project

General

Profile

Actions

Bug #7890

closed

Data class should have documentation

Added by halogenandtoast (Matthew Mongeau) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
2.0.0
Backport:
[ruby-core:52549]

Description

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.

Updated by halogenandtoast (Matthew Mongeau) over 11 years ago

I have a lack of experience with redmine. I don't see my patch attached, so just incase:

Index: object.c

--- object.c (revision 39327)
+++ object.c (working copy)
@@ -3115,6 +3115,12 @@
rb_cData = rb_define_class("Data", rb_cObject);
rb_undef_alloc_func(rb_cData);

  • /*
  • * 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");
Actions #2

Updated by zzak (zzak _) over 11 years ago

  • Status changed from Open to Closed

This issue was solved with changeset r39330.
Matthew, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Updated by nobu (Nobuyoshi Nakada) over 11 years ago

I've supposed removal of Data in Ruby level.

Updated by halogenandtoast (Matthew Mongeau) over 11 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0