[ap4r-devel] [ ap4r-Bugs-21226 ] UUID bugs: last_clock
noreply at rubyforge.org
noreply at rubyforge.org
Mon Jul 14 23:58:51 EDT 2008
Bugs item #21226, was opened at 2008-07-15 12:58
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=6910&aid=21226&group_id=1765
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: shunichi shinohara (shino)
Assigned to: Nobody (None)
Summary: UUID bugs: last_clock
Initial Comment:
I'm looking at your UUID class http://trac.labnotes.org/cgi-bin/trac.cgi/browser/uuid/lib/uuid.rb and am puzzled by two things:
* line 202 you have "elsif clock = @@last_clock", that's an assignment that will always evaluate to true as far as I can tell
* if you change 202 to ==, then the combination of 205 incrementing @@last_clock by 1 and the masking of the lower-order bits of the time in line 198 will make it that the next time you generate a UUID withing the same clock tick the clock is less than @@last_clock, which is not what you intend.
I'll see how I can fix this on my end. Thanks for making your class available!
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=6910&aid=21226&group_id=1765
More information about the ap4r-devel
mailing list