Closed outoftime closed 10 years ago
Ah, I've made a silly mistake in Uuid#hash
. I use the mask 0xffffffffffffffff
so what comes out is an unsigned long and will overflow a Java long. A 32 bit hash value would probably work just as well.
Thanks for the bug report, I will try to fix this and push out a v1.2.1 soon.
v1.2.1 is out.
@iconara thanks!!
To reproduce:
Backtrace:
I notice that the
#hash
returned by aUuid
is roughly 64 bits, whereas that of, say, aString
is roughly 32 bits in jruby. (In MRI,String
also returns a 64-bit hash).So it seems like the
Uuid#hash
implementation should return an integer of no more than 32 bits on jruby, although I'm guessing there's a better thing to check than “is this jruby”. Thoughts? I'd be happy to dig deeper if nothing comes to mind.