* [shogi-server]
- shogi_server/league/floodgate.rb: Improved robustness against
empty file under ruby 1.9.3p194
+ * [mk_game_results]
+ - Fixed for reading Japanese comments under ruby1.9.3p194.
2013-11-23 Daigo Moriwaki <daigo at debian dot org>
# @parameter file an absolute path of a csa file
#
def grep(file)
- str = File.open(file).read
+ if RUBY_VERSION >= "1.9.1"
+ str = File.open(file, "r:EUC-JP").read
+ else
+ str = File.open(file, "r").read
+ end
if /^N\+(.*)$/ =~ str then black_name = $1.strip end
if /^N\-(.*)$/ =~ str then white_name = $1.strip end