Skip to content

Commit

Permalink
Fix ruby 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Sep 13, 2023
1 parent 765babd commit 9262fb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gems/aws-sdk-core/lib/aws-sdk-core/endpoints/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def self.valid_host_label?(value, allow_sub_domains = false)
return labels.all? { |l| valid_host_label?(l) }
end

value.match?(/\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/)
!!(value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/)
end

# AWS
Expand Down Expand Up @@ -122,7 +122,7 @@ def self.aws_virtual_hostable_s3_bucket?(value, allow_sub_domains = false)
end

# must be between 3 and 63 characters long, no uppercase
value.match?(/\A(?!-)[a-z0-9-]{3,63}(?<!-)\z/) &&
value =~ /\A(?!-)[a-z0-9-]{3,63}(?<!-)\z/ &&
# not an IP address
value !~ /(\d+\.){3}\d+/
end
Expand Down

0 comments on commit 9262fb8

Please sign in to comment.