Skip to content

Commit

Permalink
Fixed bug which caused UUID.new to fail if the state file was somehow…
Browse files Browse the repository at this point in the history
… extant but empty
  • Loading branch information
algrs authored and assaf committed Jan 28, 2010
1 parent b2f7ca0 commit 241014a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/uuid.rb
Expand Up @@ -180,7 +180,7 @@ def initialize
@last_clock = (Time.now.to_f * CLOCK_MULTIPLIER).to_i
@mutex = Mutex.new

if File.exist?(self.class.state_file) then
if File.size?(self.class.state_file) then
next_sequence
else
@mac = Mac.addr.gsub(/:|-/, '').hex & 0x7FFFFFFFFFFF
Expand Down

0 comments on commit 241014a

Please sign in to comment.