From: Roger Meier Date: Sat, 19 Jan 2013 20:04:12 +0000 (+0100) Subject: THRIFT-1789 fix json protocol read set begin X-Git-Tag: 0.9.1~196 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=772b2b1804252c76142be5a025a0f48e19c0c792;p=common%2Fthrift.git THRIFT-1789 fix json protocol read set begin Patch: Kevin Radloff --- diff --git a/lib/rb/lib/thrift/protocol/json_protocol.rb b/lib/rb/lib/thrift/protocol/json_protocol.rb index 6f8d1d17..8694b7d0 100644 --- a/lib/rb/lib/thrift/protocol/json_protocol.rb +++ b/lib/rb/lib/thrift/protocol/json_protocol.rb @@ -717,6 +717,7 @@ module Thrift def read_set_begin read_json_array_start + [get_type_id_for_type_name(read_json_string), read_json_integer] end def read_set_end diff --git a/lib/rb/spec/json_protocol_spec.rb b/lib/rb/spec/json_protocol_spec.rb index a294ac5b..2f7f1e6b 100644 --- a/lib/rb/spec/json_protocol_spec.rb +++ b/lib/rb/spec/json_protocol_spec.rb @@ -435,8 +435,8 @@ describe 'JsonProtocol' do end it "should read set begin" do - @trans.write("[") - @prot.read_set_begin.should == nil + @trans.write("[\"rec\",2\"\"") + @prot.read_set_begin.should == [12, 2] end it "should read set end" do