OSDN Git Service

Fix mk_gamke_results so that it skip incomplete record filesZ
authorDaigo Moriwaki <daigo@debian.org>
Sat, 2 Sep 2017 12:45:32 +0000 (21:45 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sat, 2 Sep 2017 12:45:32 +0000 (21:45 +0900)
mk_game_results

index f08ca98..f1b89c3 100755 (executable)
@@ -65,14 +65,14 @@ def grep(file)
     str = File.open(file, "r").read
   end
 
-    black_name = ""
-    black_mark = ""
-    black_id = ""
-    white_name = ""
-    white_mark = ""
-    white_id = ""
-    state = ""
-    time = ""
+    black_name = nil
+    black_mark = nil
+    black_id = nil
+    white_name = nil
+    white_mark = nil
+    white_id = nil
+    state = nil
+    time = nil
     moves = 0
     str.each_line do |line|
         line.strip!