diff options
author | Zachary Anker <zanker@squareup.com> | 2017-09-14 08:35:13 -0700 |
---|---|---|
committer | Zachary Anker <zanker@squareup.com> | 2017-09-20 11:38:05 -0700 |
commit | 83264bd160326fe808c2d5bfbebe54e77f781152 (patch) | |
tree | 68c4391f0cbf1a6fcdda11e4028a66af108f87e5 /ruby/tests/basic.rb | |
parent | d1bc27caef8377a710370189675cb0958443e8f1 (diff) | |
download | protobuf-83264bd160326fe808c2d5bfbebe54e77f781152.tar.gz protobuf-83264bd160326fe808c2d5bfbebe54e77f781152.tar.bz2 protobuf-83264bd160326fe808c2d5bfbebe54e77f781152.zip |
Fixed to_h with repeated messages to return hashes in Ruby
Diffstat (limited to 'ruby/tests/basic.rb')
-rw-r--r-- | ruby/tests/basic.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb index 94071ca0..3b8ca1fa 100644 --- a/ruby/tests/basic.rb +++ b/ruby/tests/basic.rb @@ -927,7 +927,7 @@ module BasicTest end def test_to_h - m = TestMessage.new(:optional_bool => true, :optional_double => -10.100001, :optional_string => 'foo', :repeated_string => ['bar1', 'bar2']) + m = TestMessage.new(:optional_bool => true, :optional_double => -10.100001, :optional_string => 'foo', :repeated_string => ['bar1', 'bar2'], :repeated_msg => [TestMessage2.new(:foo => 100)]) expected_result = { :optional_bool=>true, :optional_bytes=>"", @@ -947,7 +947,7 @@ module BasicTest :repeated_float=>[], :repeated_int32=>[], :repeated_int64=>[], - :repeated_msg=>[], + :repeated_msg=>[{:foo => 100}], :repeated_string=>["bar1", "bar2"], :repeated_uint32=>[], :repeated_uint64=>[] |