On Sun, Oct 20, 2013 at 6:01 PM, Love U Ruby [email protected]
Below part is happening as expected :
class B<Object;end # expeted error here as above.
B.superclass # => A #still the super class is showing as A.
The implementation of that behavior is here:
I don’t know the rationale behind that.
If I had to bet one dollar and conjecture something :), I’d say that is
done that way so that you do not need to specify again the superclass
you reopen a class (think class_eval with a different scope).
But then, I believe this is not consistent and there’s a bug. If that
the motivation (hypothesis), then I’d expect the following:
If no superclass is specified, then just reopen.
If a superclass is specified, then validate it.
But 1) is not implemented that way, it bypasses the check if super is
Object (either implicit or explicit). I think that is suspicious.