summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Duxbury <bryanduxbury@apache.org>2009-09-01 23:18:34 +0000
committerBryan Duxbury <bryanduxbury@apache.org>2009-09-01 23:18:34 +0000
commit6f6318a652fc3401f92ea44869c6d80a13afa13d (patch)
tree9cbbfd8e74c157761fdea31b7fab30d7c2671b71
parentab3666e6caad79315fddf0f8f38c13c7a10cc23a (diff)
downloadthrift-6f6318a652fc3401f92ea44869c6d80a13afa13d.tar.gz
THRIFT-572. rb: fix RSTRING for 1.9 compatibility
Use a macro compatible with Ruby 1.9. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810303 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--lib/rb/ext/memory_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rb/ext/memory_buffer.c b/lib/rb/ext/memory_buffer.c
index 3a9c101a3..74efa2c0f 100644
--- a/lib/rb/ext/memory_buffer.c
+++ b/lib/rb/ext/memory_buffer.c
@@ -54,7 +54,7 @@ VALUE rb_thrift_memory_buffer_read(VALUE self, VALUE length_value) {
index = 0;
}
- if (RSTRING(data)->len < length) {
+ if (RSTRING_LEN(data) < length) {
rb_raise(rb_eEOFError, "Not enough bytes remain in memory buffer");
}