Browse Source

Ruby way for casting nil to array

master
aeris 3 months ago
parent
commit
0ef72b7a4b
  1. 2
      lib/cryptcheck/tls.rb

2
lib/cryptcheck/tls.rb

@ -9,7 +9,7 @@ module CryptCheck
end
def self.aggregate(hosts)
hosts = [hosts] unless hosts.respond_to? :collect
hosts = Array hosts
hosts.inject([]) { |l, h| l + h.to_h }
end

Loading…
Cancel
Save