From 83264bd160326fe808c2d5bfbebe54e77f781152 Mon Sep 17 00:00:00 2001 From: Zachary Anker Date: Thu, 14 Sep 2017 08:35:13 -0700 Subject: Fixed to_h with repeated messages to return hashes in Ruby --- ruby/tests/basic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ruby/tests') 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=>[] -- cgit v1.2.3