From d98bfcfd055e70e64b29bf73d10ed6a28be77c33 Mon Sep 17 00:00:00 2001 From: Pavel Manylov Date: Wed, 6 Mar 2013 18:12:21 +0600 Subject: [PATCH] Correct user's home directory detection (windows compatibility for ruby >= 1.9.3p362) We could use Dir.home instead of this code, but it will not be compatible with old rubies --- lib/uuid.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/uuid.rb b/lib/uuid.rb index 02a1445..d484d93 100644 --- a/lib/uuid.rb +++ b/lib/uuid.rb @@ -176,7 +176,7 @@ def self.state_file(mode = 0644) @state_file = File.join(state_dir, 'ruby-uuid') if !File.writable?(state_dir) || (File.exists?(@state_file) && !File.writable?(@state_file)) then - @state_file = File.expand_path('.ruby-uuid', '~') + @state_file = File.join File.expand_path('~'), '.ruby-uuid' end @state_file