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:
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.
i am getting an no implicit conversion from nil to integer .please
suggest any solution
error is coming from the C code inside the Ruby interpreter. A core
class, implemented in C, is being handed a nil when it expects an
Integer. It may have a #to_i but it doesn’t have a #to_int and so the
result is the TypeError.
but how can i change there please suggest solution…
On Mon, Oct 21, 2013 at 9:42 PM, Love U Ruby [email protected]
wrote:
Xavier N. wrote in post #1125043:
On Sun, Oct 20, 2013 at 6:01 PM, Love U Ruby [email protected]
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.