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 when
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 was
the motivation (hypothesis), then I'd expect the following:
1) If no superclass is specified, then just reopen.
2) 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.
···
On Sun, Oct 20, 2013 at 6:01 PM, Love U Ruby <lists@ruby-forum.com> wrote:
On Mon, Oct 21, 2013 at 9:42 PM, Love U Ruby <lists@ruby-forum.com> wrote:
> On Sun, Oct 20, 2013 at 6:01 PM, Love U Ruby <lists@ruby-forum.com> > > wrote:
> But 1) is not implemented that way, it bypasses the check if super is
> Object (either implicit or explicit). I think that is suspicious.
Thanks Xavier
Shall I submit it as a bug?
I think so. It could be a good opportunity to try to contribute a patch
even, probably having a look at the existing code and tests this proposal
shouldn't need a small amount of code.