THRIFT-3364 Fix ruby binary field encoding in TJSONProtocol
Client: Ruby
Patch: Nobuaki Sukegawa <nsukeg@gmail.com>

This closes #633
diff --git a/test/rb/Gemfile b/test/rb/Gemfile
index 8301e44..58c04aa 100644
--- a/test/rb/Gemfile
+++ b/test/rb/Gemfile
@@ -4,3 +4,4 @@
 
 gem "rack", "~> 1.5.2"
 gem "thin", "~> 1.5.0"
+gem "test-unit"
diff --git a/test/rb/integration/TestClient.rb b/test/rb/integration/TestClient.rb
index b31a024..fb339c4 100755
--- a/test/rb/integration/TestClient.rb
+++ b/test/rb/integration/TestClient.rb
@@ -125,7 +125,7 @@
 
   def test_binary
     p 'test_binary'
-    val = [42, 0, 142, 242]
+    val = (0...256).reverse_each.to_a
     ret = @client.testBinary(val.pack('C*'))
     assert_equal(val, ret.bytes.to_a)
   end
diff --git a/test/rb/integration/TestServer.rb b/test/rb/integration/TestServer.rb
index 0021e2a..bab723a 100755
--- a/test/rb/integration/TestServer.rb
+++ b/test/rb/integration/TestServer.rb
@@ -32,6 +32,8 @@
    :testEnum, :testTypedef, :testMultiException].each do |meth|
 
     define_method(meth) do |thing|
+      p meth
+      p thing
       thing
     end