From: Lars Haugseth Date: 2009-02-25T23:14:15+09:00 Subject: Re: uniuq no * Vetrivel Vetrivel wrote: > > I want to create new unique id in ruby.I have used the following > coding.But I don''t know whether it works perfectly or not. > > t = Time.new > p "%10.5f" % t.to_f > > does it give unique value always.I you know some other way ,please say > to create unique id . UUID� is a standard way of constructing unique identifiers, and a Ruby library� exist already, so unless you require the identifiers to be integers, I suggest you use that. [1] http://en.wikipedia.org/wiki/UUID [2] http://wiki.github.com/assaf/uuid -- Lars Haugseth "If anyone disagrees with anything I say, I am quite prepared not only to retract it, but also to deny under oath that I ever said it." -Tom Lehrer