OSDN Git Service

test/TC_uchifuzume.rb did not run with Ruby 1.8.7. This issue has been fixed.
authorDaigo Moriwaki <beatles@users.sourceforge.jp>
Sat, 7 Jan 2012 04:11:28 +0000 (13:11 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sat, 7 Jan 2012 04:11:28 +0000 (13:11 +0900)
changelog
test/TC_uchifuzume.rb

index 215d0a3..a128cc8 100644 (file)
--- a/changelog
+++ b/changelog
@@ -5,6 +5,8 @@
            methods and allows Ruby 1.8.7 to run the server.
          - test/TC_floodgate.rb failed with Ruby 1.8.7. This issue has
            been fixed.
+         - test/TC_uchifuzume.rb did not run with Ruby 1.8.7. This issue
+           has been fixed.
 
 2012-01-06  Daigo Moriwaki <daigo at debian dot org>
 
index cc7ea88..c84ddea 100644 (file)
@@ -5,7 +5,7 @@ include Socket::Constants
 
 class UchifuzumeTest < ReadFileClient
   def test_uchifuzume
-    csa = File.read(filepath("uchifuzume.csa"), :encoding => Encoding::Shift_JIS)
+    csa = File.open(filepath("uchifuzume.csa"), "r+:shift_jis"){|f| f.read}
     handshake(csa)
     @p2.puts "-0064FU"
     @p1.puts "%TORYO"
@@ -16,7 +16,7 @@ class UchifuzumeTest < ReadFileClient
   end
 
   def test_not_uchifuzume
-    csa = File.read(filepath("not_uchifuzume.csa"), :encoding => Encoding::Shift_JIS)
+    csa = File.open(filepath("not_uchifuzume.csa"), "r+:shift_jis"){|f| f.read}
     handshake(csa)
     @p2.puts "-0092FU"
     @p1.puts "%TORYO"