Bug #4803

RCLASS_SUPER won't compile for C extensions as of revision 31627

Added by Daniel Azuma almost 3 years ago. Updated almost 3 years ago.

[ruby-core:36565]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:-
Target version:-
ruby -v:- Backport:

Description

The RCLASSSUPER macro (defined in ruby.h) no longer compiles for C extensions because the required rbclassextt type has been made opaque as of svn revision 31627. This is breaking certain gems that rely on RCLASSSUPER to hack the class tree, such as blockenspiel and mixology.

Associated revisions

Revision 32162
Added by Nobuyoshi Nakada almost 3 years ago

  • include/ruby/backward/classext.h: for evil gems. fixed #4803

History

#1 Updated by Daniel Azuma almost 3 years ago

Can anyone explain to me the rationale behind moving the rbclassextt definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASSSUPER? I need to access and set the direct superclass, even if it's a TICLASS, so calling rbclasssuperclass() is not sufficient. Thanks!

#2 Updated by Yukihiro Matsumoto almost 3 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 1.9 - Bug #4803] RCLASSSUPER 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
classextt definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASSSUPER? I need to access and set the direct superclass, even if it's a TICLASS, so calling rbclass_superclass() is not sufficient. Thanks!

I think Nobu considered rbclassextt should not be disclosed to
extensions, but since some extensions already use it, it might be
better to make it public anyway.

                        matz.

#3 Updated by Yukihiro Matsumoto almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada

#4 Updated by Roger Pack almost 3 years ago

just ran into this, as well

https://gist.github.com/1006162

If there's a work around do let us know :)

-roger-

#5 Updated by Nobuyoshi Nakada almost 3 years ago

Hi,

At Sat, 4 Jun 2011 01:33:38 +0900,
Roger Pack wrote in :

just ran into this, as well

https://gist.github.com/1006162

If there's a work around do let us know :)

rbclasssuperclass() since 1.4.0.

--
Nobu Nakada

#6 Updated by Nobuyoshi Nakada almost 3 years ago

Hi,

At Mon, 6 Jun 2011 23:47:57 +0900,
Roger Pack wrote in :

rbclasssuperclass() 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

#7 Updated by Nobuyoshi Nakada almost 3 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

Also available in: Atom PDF