Skip to content

Commit

Permalink
hide the internal __ModuleObject class
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Sansonetti committed Apr 29, 2011
1 parent bfcea02 commit 5a69f15
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion class.c
Expand Up @@ -30,7 +30,12 @@ rb_class_super(VALUE klass)
if (klass == 0) {
return 0;
}
return (VALUE)class_getSuperclass((Class)klass);
VALUE super = (VALUE)class_getSuperclass((Class)klass);
if (super == rb_cModuleObject) {
// This is an internal class.
return 0;
}
return super;
}

void
Expand Down

0 comments on commit 5a69f15

Please sign in to comment.