OSDN Git Service

* [shogi-server]
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Thu, 18 Jun 2009 13:28:08 +0000 (13:28 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Thu, 18 Jun 2009 13:28:08 +0000 (13:28 +0000)
  - An emtpy floodgate_history.yaml caused a server error. This
    issue has been fixed.
    (Closes: #15124)

changelog
shogi_server/league/floodgate.rb

index e3337c1..9e917dd 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+2009-06-18 Daigo Moriwaki <daigo at debian dot org>
+
+       * [shogi-server]
+         - An emtpy floodgate_history.yaml caused a server error. This
+           issue has been fixed. 
+           (Closes: #15124)
+
 2009-06-17 Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
index f780cc8..aeab05c 100644 (file)
@@ -67,7 +67,8 @@ class League
 
       attr_reader :records
 
-      # file_path_name is a Pathname object for this storage
+      # Initialize this instance.
+      # @param file_path_name a Pathname object for this storage
       #
       def initialize(file_path_name)
         @records = []
@@ -104,7 +105,7 @@ class League
         @records = YAML.load_file(@file)
         unless @records && @records.instance_of?(Array)
           $logger.error "%s is not a valid yaml file. Instead, an empty array will be used and updated." % [@file]
-          @records = [].to_yaml
+          @records = []
         end
       end