THRIFT-313. rb: BinaryProtocolAccelerated and BinaryProtocol don't produce the same bytes when writes aren't strict
A Fixnum was not properly being converted to its native value before being written. This patch rectifies that problem.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756308 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/binary_protocol_accelerated.c b/lib/rb/ext/binary_protocol_accelerated.c
index bb4f4a3..45f5a52 100644
--- a/lib/rb/ext/binary_protocol_accelerated.c
+++ b/lib/rb/ext/binary_protocol_accelerated.c
@@ -103,7 +103,7 @@
write_i32_direct(trans, FIX2INT(seqid));
} else {
write_string_direct(trans, name);
- write_byte_direct(trans, type);
+ write_byte_direct(trans, FIX2INT(type));
write_i32_direct(trans, FIX2INT(seqid));
}