Updated Branches: refs/heads/master a1e36f6ee -> 772b2b180
THRIFT-1789 fix json protocol read set begin Patch: Kevin Radloff Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/772b2b18 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/772b2b18 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/772b2b18 Branch: refs/heads/master Commit: 772b2b1804252c76142be5a025a0f48e19c0c792 Parents: a1e36f6 Author: Roger Meier <[email protected]> Authored: Sat Jan 19 21:04:12 2013 +0100 Committer: Roger Meier <[email protected]> Committed: Sat Jan 19 21:04:12 2013 +0100 ---------------------------------------------------------------------- lib/rb/lib/thrift/protocol/json_protocol.rb | 1 + lib/rb/spec/json_protocol_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/772b2b18/lib/rb/lib/thrift/protocol/json_protocol.rb ---------------------------------------------------------------------- diff --git a/lib/rb/lib/thrift/protocol/json_protocol.rb b/lib/rb/lib/thrift/protocol/json_protocol.rb index 6f8d1d1..8694b7d 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 http://git-wip-us.apache.org/repos/asf/thrift/blob/772b2b18/lib/rb/spec/json_protocol_spec.rb ---------------------------------------------------------------------- diff --git a/lib/rb/spec/json_protocol_spec.rb b/lib/rb/spec/json_protocol_spec.rb index a294ac5..2f7f1e6 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
