Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer Array#concat over #+= on Array #36

Merged
merged 1 commit into from Apr 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/resolv.rb
Expand Up @@ -198,7 +198,7 @@ def lazy_initialize # :nodoc:
next unless addr
@addr2name[addr] = [] unless @addr2name.include? addr
@addr2name[addr] << hostname
@addr2name[addr] += aliases
@addr2name[addr].concat(aliases)
@name2addr[hostname] = [] unless @name2addr.include? hostname
@name2addr[hostname] << addr
aliases.each {|n|
Expand Down Expand Up @@ -967,7 +967,7 @@ def Config.parse_resolv_conf(filename)
next unless keyword
case keyword
when 'nameserver'
nameserver += args
nameserver.concat(args)
when 'domain'
next if args.empty?
search = [args[0]]
Expand Down