kpumuk commented on code in PR #3716:
URL: https://github.com/apache/thrift/pull/3716#discussion_r3787976922


##########
test/rb/generation/test_struct.rb:
##########
@@ -38,7 +38,7 @@ def test_default_values
     assert_kind_of(Hash, hello.complex)
     assert_equal(hello.complex, { 6243 => 632, 2355 => 532, 23 => 532})
 
-    bool_passer = TestNamespace::BoolPasser.new(:value => false)
+    bool_passer = TestNamespace::BoolPasser.new(value: false)

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/union_spec.rb:
##########
@@ -171,15 +171,15 @@
 
     it "should properly serialize and match structs with a union" do
       union = SpecNamespace::My_union.new(:integer32, 26)
-      swu = SpecNamespace::Struct_with_union.new(:fun_union => union)
+      swu = SpecNamespace::Struct_with_union.new(fun_union: union)
 
       trans = Thrift::MemoryBufferTransport.new

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/struct_spec.rb:
##########
@@ -68,7 +68,7 @@ def validate; end
     def validate_default_arguments(object)
       expect(object.simple).to eq(53)
       expect(object.words).to eq("words")
-      expect(object.hello).to eq(SpecNamespace::Hello.new(:greeting => "hello, 
world!"))
+      expect(object.hello).to eq(SpecNamespace::Hello.new(greeting: "hello, 
world!"))
       expect(object.ints).to eq([1, 2, 2, 3])

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/struct_spec.rb:
##########
@@ -86,14 +86,14 @@ def validate_default_arguments(object)
     end
 
     it "should properly initialize boolean values" do
-      struct = SpecNamespace::BoolStruct.new(:yesno => false)
+      struct = SpecNamespace::BoolStruct.new(yesno: false)
       expect(struct.yesno).to be_falsey
     end
 

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/struct_spec.rb:
##########
@@ -310,8 +310,8 @@ def validate_default_arguments(object)
 
     it "should serialize subclasses of Set like Set" do
       set_subclass = Class.new(Set)
-      regular = SpecNamespace::Foo.new(:shorts => Set.new([5, 17, 239]))
-      subclassed = SpecNamespace::Foo.new(:shorts => set_subclass.new([5, 17, 
239]))
+      regular = SpecNamespace::Foo.new(shorts: Set.new([5, 17, 239]))
+      subclassed = SpecNamespace::Foo.new(shorts: set_subclass.new([5, 17, 
239]))
       serializer = Thrift::Serializer.new(Thrift::BinaryProtocolFactory.new)

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/serializer_spec.rb:
##########
@@ -299,7 +299,7 @@ def get_protocol(transport)
     end
 
     it "does not retain previous struct state when reading fails" do
-      target = SpecNamespace::Foo.new(:simple => 99, :opt_string => "old")
+      target = SpecNamespace::Foo.new(simple: 99, opt_string: "old")
       payload = binary_payload(finish: false) do |protocol, transport|

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
lib/rb/spec/nonblocking_server_spec.rb:
##########
@@ -33,7 +33,7 @@ def greeting(english)
       if english
         SpecNamespace::Hello.new
       else
-        SpecNamespace::Hello.new(:greeting => "Aloha!")
+        SpecNamespace::Hello.new(greeting: "Aloha!")
       end

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



##########
test/rb/generation/test_struct.rb:
##########
@@ -38,7 +38,7 @@ def test_default_values
     assert_kind_of(Hash, hello.complex)
     assert_equal(hello.complex, { 6243 => 632, 2355 => 532, 23 => 532})
 
-    bool_passer = TestNamespace::BoolPasser.new(:value => false)
+    bool_passer = TestNamespace::BoolPasser.new(value: false)

Review Comment:
   Not applicable. `Thrift::Struct#initialize(d = {}, &block)` declares no 
keyword parameters, so Ruby passes this label-style argument list as its single 
positional Hash. The CI matrix passes these exact specs on Ruby 2.7, every Ruby 
3.x release, Ruby 4.0, and Ruby head.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to