summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/resolv.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 51083134a3..a5a997a43d 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -264,9 +264,7 @@ class Resolv
def each_name(address, &proc)
lazy_initialize
- if @addr2name.include?(address)
- @addr2name[address].each(&proc)
- end
+ @addr2name[address]&.each(&proc)
end
end