OSDN Git Service

Fixed case... when... syntax for Ruby 1.9.3.
authorDaigo Moriwaki <beatles@users.sourceforge.jp>
Sat, 3 Dec 2011 06:36:46 +0000 (15:36 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sat, 3 Dec 2011 06:36:46 +0000 (15:36 +0900)
shogi_server/player.rb

index 7e235f9..fa43182 100644 (file)
@@ -118,8 +118,8 @@ class BasicPlayer
 
   def set_sente_from_str(str)
     case str
-    when "+": @sente = true
-    when "-": @sente = false
+    when "+" then @sente = true
+    when "-" then @sente = false
     else
       # str should be "*"
       @sente = nil