THRIFT-374. rb: ruby 1.9 compatibility

This patch updates the thrift_native package to use 1.9 compatible macros and fixes the pure ruby stuff to behave equally well in ruby1.8.6-ruby1.9.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758435 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/macros.h b/lib/rb/ext/macros.h
index 4dd3a57..6dbb7ad 100644
--- a/lib/rb/ext/macros.h
+++ b/lib/rb/ext/macros.h
@@ -22,4 +22,8 @@
 #define GET_STRICT_WRITE(obj) rb_ivar_get(obj, strict_write_ivar_id)
 #define WRITE(obj, data, length) rb_funcall(obj, write_method_id, 1, rb_str_new(data, length))
 #define CHECK_NIL(obj) if (NIL_P(obj)) { rb_raise(rb_eStandardError, "nil argument not allowed!");}
-#define READ(obj, length) rb_funcall(GET_TRANSPORT(obj), read_method_id, 1, INT2FIX(length)) 
\ No newline at end of file
+#define READ(obj, length) rb_funcall(GET_TRANSPORT(obj), read_method_id, 1, INT2FIX(length))
+
+#ifndef RFLOAT_VALUE
+#  define RFLOAT_VALUE(v) RFLOAT(rb_Float(v))->value
+#endif
\ No newline at end of file