@@ -623,7 +623,7 @@ think about what happens on the false branch of the `if`.
623623The `BUILTIN_TYPE()` of `rb_make_metaclass()` is similar to `TYPE()`
624624as it is a macro to get the structure type flag (`T_xxxx`). That means
625625this check in `rb_make_metaclass` means "if `obj` is a class". For the
626- moment it's better not to limit ourselves to `obj` being a class, so
626+ moment we assume that `obj` is a class, so
627627we'll remove it.
628628
629629With these simplifications, we get the following:
@@ -783,6 +783,11 @@ object oriented languages where classes are objects that `Class`'s
783783class is to `Class` itself, creating an endless virtual instance-class
784784relationship.
785785
786+ ((errata:<br>
787+ This structure is implemented efficiently in recent Ruby 1.8,
788+ thus it can be implemented efficiently.
789+ ))
790+
786791I'm repeating myself, but the fact that `Class`'s class is `Class` is
787792only to make the implementation easier, there's nothing important in
788793this logic.
@@ -1219,7 +1224,8 @@ st_add_direct(rb_class_tbl, id, klass);
12191224</pre>
12201225
12211226This part assigns the class to the constant. However, whichever
1222- way you look at it you do not see that. In fact, top-level classes are
1227+ way you look at it you do not see that. In fact, top-level classes and modules
1228+ that are defined in C are
12231229separated from the other constants and regrouped in
12241230`rb_class_tbl()`. The split is slightly related to the GC. It's not
12251231essential.
0 commit comments