On Monday 28 June 2004 12:57, Florian Gross wrote:
> Sean O'Dell wrote:
> >>Oddly, Sean, when you are saying, "it worked like I said it could",
> >>I am hearing Guy saying, "yes - but it doesn't work like I said it
> >>wouldn't."
> >
> > Oh no, I didn't mean it was TOTALLY stable.  I just meant it appeared
> > stable to me and I wanted some people who knew better about the Ruby
> > internals to make an assessment, which is why I brought it up in
> > ruby-core.
>
> You might not have noticed it, but that is exactly what ts did. And matz
> once stated that if he were to be hit by a bus that he would want ts to
> take over Ruby's development. If you ask me, ts has more than enough
> knowledge of Ruby's internals to rightly do point out errors -- and
> that's exactly what he did as far as I see the whole situation.

Ah, so it was insulting when I didn't accept his word outright.  I see.  Well, 
I meant no harm; I didn't know Guy knew so much about the internals he could 
make a quick call like that.

> > In fact, I still have the feature installed here.  If someone could show
> > me some Ruby code that makes Ruby crash with the #class= method I
> > implemented, I would be more than happy to retract even that much.  Show
> > me code that crashes my #class= implementation; I already assume it can
> > be done, now just show me how.
>
> I haven't tested these with your implementation, but they once were
> problematic in evil.rb.
>
> Object.class = Object # ?
> Class.class = Module # ?

These two I would protect from #class=.  Object, Class, Module and any other 
built-in, bootstrap-type classes I wouldn't even try #class= with.

> 5.class = Object # ?

This one crashes as an integer, but as a float it does not.  I'm not sure how 
to apply a type check to an integer.

> obj = Time.new; require 'stringio'; obj.class = StringIO # ?

This one gave this error:

testclass.rb:2:in `require': No such file to load -- stringio (LoadError)
        from testclass.rb:2

...which is exactly the direction I would keep developing #class= towards; to 
get a simple exception.

	Sean O'Dell