THRIFT-671. rb: Ruby compact protocol implementation gets mixed up when there are fields that don't fit in the delta space

This patch adds a test and a fix for the problem.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@896712 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/compact_protocol.c b/lib/rb/ext/compact_protocol.c
index 33a1f9f..768b2e5 100644
--- a/lib/rb/ext/compact_protocol.c
+++ b/lib/rb/ext/compact_protocol.c
@@ -458,6 +458,7 @@
     
     if (modifier == 0) {
       // not a delta. look ahead for the zigzag varint field id.
+      LAST_ID(self);
       field_id = read_i16(self);
     } else {
       // has a delta. add the delta to the last read field id.