From: David Reiss Date: Wed, 6 Feb 2008 18:22:39 +0000 (+0000) Subject: Thrift/Ruby: Bug fix. X-Git-Tag: 0.2.0~1010 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e4667378c4e30f1b7b465e89837462a2fed28b16;p=common%2Fthrift.git Thrift/Ruby: Bug fix. Summary: Some member variables were actually being treated as local variables. Reviewed By: mcslee Test Plan: None. Revert Plan: ok Other Notes: Actually reviewed by Kevin Clark. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665462 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/transport/ttransport.rb b/lib/rb/lib/thrift/transport/ttransport.rb index 781db836..bdf09351 100644 --- a/lib/rb/lib/thrift/transport/ttransport.rb +++ b/lib/rb/lib/thrift/transport/ttransport.rb @@ -210,8 +210,8 @@ class TMemoryBuffer < TTransport def initialize(sz=1024) @buf = '' @sz = sz - wpos = 0 - rpos = 0 + @wpos = 0 + @rpos = 0 end def isOpen @@ -225,7 +225,7 @@ class TMemoryBuffer < TTransport end def peek - return rpos < wpos + return @rpos < @wpos end def getBuffer