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.
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!
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.
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