aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/tests
diff options
context:
space:
mode:
authorGravatar Zachary Anker <zanker@squareup.com>2017-09-14 08:35:13 -0700
committerGravatar Zachary Anker <zanker@squareup.com>2017-09-20 11:38:05 -0700
commit83264bd160326fe808c2d5bfbebe54e77f781152 (patch)
tree68c4391f0cbf1a6fcdda11e4028a66af108f87e5 /ruby/tests
parentd1bc27caef8377a710370189675cb0958443e8f1 (diff)
Fixed to_h with repeated messages to return hashes in Ruby
Diffstat (limited to 'ruby/tests')
-rw-r--r--ruby/tests/basic.rb4
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=>[]