On Sun, Feb 26, 2006 at 06:06:17PM +0100, Mauricio Fernandez wrote: > > --- ruby.h 5 Feb 2006 15:43:10 -0000 1.97.2.11 > > +++ ruby.h 26 Feb 2006 15:43:22 -0000 > > @@ -169,3 +169,3 @@ VALUE rb_ull2inum _((unsigned LONG_LONG) > > #define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG)) > > -#define SYM2ID(x) RSHIFT((long)x,8) > > +#define SYM2ID(x) RSHIFT((unsigned long)x,8) > > This solves the crash but doesn't prevent collisions, does it? Normal > objects are indeed 4-byte aligned, but whereas rb_obj_id uses LONG2NUM > for immediate values, it just does obj|FIXNUM_FLAG for normal objects, > so there can be a collision for VALUEs x such that x & 0x1f == 0x1c. ==== 0xff -- Mauricio Fernandez - http://eigenclass.org - non-trivial Ruby