> > My question is: since Kernel#id gives the internal Ruby identifier of
> > the object in question, something that does not change, why does this
> > method allow the setting of the id of the object? Is there a valid
> > reason to write to the id?
> >
> 
> It doesn't. When you write, you're writing to a variable. When you 
> read, well.. it depends:

Also, it is worth noting that in 1.8 Object#id (or Kernel#id if you
like) is deprecated in favour of Object#object_id.  This should reduce
the chance of such name collision problems.

If you were using 1.8, then turning on warnings would have revealed
your problem.

Stephen.
+- S.D.Sykes - www.stephensykes.com -
ruby -e '_=2;"||_25~!A59(1A~47!K~#-6<.A~".scan(/./){
putc$&>$`?$/:_+=$&[0]-?4}'