On Oct 30, 2013, at 9:26 PM, Nobuyoshi Nakada wrote:

> (13/10/31 5:15), David MacMahon wrote:
>> It would be nice if the following were allowed:
>>=20
>> class Foo < Bar; end # class Foo extends Bar
>> class Foo; end       # class Foo still extends Bar
>=20
> This is allowed already.

Wow!  Neat!  Thanks!  I had completely missed that!  I guess I should =
re-check my examples before complaining!!! :-)

>> class Foo; end       # class Foo has Object as a "stand-in" =
superclass
>> class Foo < Bar; end # class Foo replaces Bar as its "official" =
superclass
>=20
> If it is allowed,
>=20
>  class C; end
>  c =3D C.new
>  class C < String; end
>  c.size # will segfault
>=20
> with the current object system.

Interesting.  Why would it segfault instead of at least raising =
NoMethodError?  It doesn't really matter now that I know the class can =
be reopened without specifying a superclass!  Changing the class =
hierarchy does seem a little dubious, but then again having open classes =
at all is probably considered dubious by some...

Thanks again,
Dave