You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line (result = uuidgen.strip rescue nil).empty? does not work since empty? is not a method in Nil class. You could use nil? or blank? but why even call uuidgen; it only needs to be unique on the current server therefore using "#{Time.now.to_f}-#{Thread.current.hash}-#{hash}" is more than adequate.
Note that I propose Time.now.to_f rather than to_i
Thanks
The text was updated successfully, but these errors were encountered:
The line
(result =
uuidgen.strip rescue nil).empty?
does not work sinceempty?
is not a method inNil
class. You could usenil?
orblank?
but why even calluuidgen
; it only needs to be unique on the current server therefore using"#{Time.now.to_f}-#{Thread.current.hash}-#{hash}"
is more than adequate.Note that I propose
Time.now.to_f
rather thanto_i
Thanks
The text was updated successfully, but these errors were encountered: