Bug #4803
closedRCLASS_SUPER won't compile for C extensions as of revision 31627
Description
The RCLASS_SUPER macro (defined in ruby.h) no longer compiles for C extensions because the required rb_classext_t type has been made opaque as of svn revision 31627. This is breaking certain gems that rely on RCLASS_SUPER to hack the class tree, such as blockenspiel and mixology.
Updated by dazuma (Daniel Azuma) about 12 years ago
Can anyone explain to me the rationale behind moving the rb_classext_t definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASS_SUPER? I need to access and set the direct superclass, even if it's a T_ICLASS, so calling rb_class_superclass() is not sufficient. Thanks!
Updated by matz (Yukihiro Matsumoto) about 12 years ago
- ruby -v changed from ruby 1.9.3dev (2011-05-30 trunk 31805) [x86_64-darwin10.7.4] to -
Hi,
In message "Re: [ruby-core:36566] [Ruby 1.9 - Bug #4803] RCLASS_SUPER won't compile for C extensions as of revision 31627"
on Mon, 30 May 2011 14:53:13 +0900, Daniel Azuma dazuma@gmail.com writes:
|
|Can anyone explain to me the rationale behind moving the rb_classext_t definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASS_SUPER? I need to access and set the direct superclass, even if it's a T_ICLASS, so calling rb_class_superclass() is not sufficient. Thanks!
I think Nobu considered rb_classext_t should not be disclosed to
extensions, but since some extensions already use it, it might be
better to make it public anyway.
matz.
Updated by matz (Yukihiro Matsumoto) about 12 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by rogerdpack (Roger Pack) about 12 years ago
just ran into this, as well
https://gist.github.com/1006162
If there's a work around do let us know :)
-roger-
Updated by nobu (Nobuyoshi Nakada) about 12 years ago
Hi,
At Sat, 4 Jun 2011 01:33:38 +0900,
Roger Pack wrote in [ruby-core:36721]:
just ran into this, as well
https://gist.github.com/1006162
If there's a work around do let us know :)
rb_class_superclass() since 1.4.0.
--
Nobu Nakada
Updated by nobu (Nobuyoshi Nakada) about 12 years ago
Hi,
At Mon, 6 Jun 2011 23:47:57 +0900,
Roger Pack wrote in [ruby-core:36791]:
rb_class_superclass() since 1.4.0.
Appears it has become public with 1.9.3?
Sure, it had been static, sorry.
So you can use it if available, RCLASS_SUPER() if defined, or
the member directly.
--
Nobu Nakada
Updated by nobu (Nobuyoshi Nakada) almost 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32162.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- include/ruby/backward/classext.h: for evil gems. fixed #4803