From c9e5f9bfe36e291aeac8cd86164d2949b93e442b Mon Sep 17 00:00:00 2001 From: Juli Tera Date: Thu, 2 May 2024 14:00:16 -0700 Subject: [PATCH] Do not seralize empty lists --- .../lib/aws-sdk-core/query/ec2_param_builder.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb b/gems/aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb index 3cbbd04cac5..e48bfe47bdf 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb @@ -31,13 +31,11 @@ def structure(ref, values, prefix) end def list(ref, values, prefix) - if values.empty? - set(prefix, '') - else - member_ref = ref.shape.member - values.each.with_index do |value, n| - format(member_ref, value, "#{prefix}.#{n+1}") - end + return if values.empty? + + member_ref = ref.shape.member + values.each.with_index do |value, n| + format(member_ref, value, "#{prefix}.#{n + 1}") end end