rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]

BinaryProtocolAccelerated references the deprecated name TProtocolException,
when it should be using Thrift::ProtocolException.
It also uses rb_raise() instead of rb_exc_raise().


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679897 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/binaryprotocolaccelerated.c b/lib/rb/ext/binaryprotocolaccelerated.c
index 2725bfc..31e969e 100644
--- a/lib/rb/ext/binaryprotocolaccelerated.c
+++ b/lib/rb/ext/binaryprotocolaccelerated.c
@@ -1181,9 +1181,9 @@
   }
   
   if ((version & VERSION_MASK) != VERSION_1) {
-    VALUE tprotocol_exception = rb_const_get(rb_cObject, rb_intern("TProtocolException"));
+    VALUE tprotocol_exception = rb_const_get(m_thrift, rb_intern("ProtocolException"));
     VALUE exception = rb_funcall(tprotocol_exception, rb_intern("new"), 2, rb_const_get(tprotocol_exception, rb_intern("BAD_VERSION")), rb_str_new2("Missing version identifier"));
-    rb_raise(exception, "");
+    rb_exc_raise(exception);
   }
   
   type = version & 0x000000ff;