Skip to content

Commit

Permalink
Merge pull request #15884 from danidoni/fix-deprecation-of-socket-get…
Browse files Browse the repository at this point in the history
…hostbyname

Fix deprecation of Socket.gethostbyname
  • Loading branch information
danidoni committed Mar 26, 2024
2 parents 7feb24d + fb309cb commit 492f24a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100`
# on 2024-03-04 14:13:59 UTC using RuboCop version 1.61.0.
# on 2024-03-26 08:59:27 UTC using RuboCop version 1.62.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -24,12 +24,6 @@ Lint/AssignmentInCondition:
Exclude:
- 'dist/clouduploader.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Lint/DeprecatedClassMethods:
Exclude:
- 'dist/t/spec/support/capybara.rb'

# Offense count: 2
Lint/RescueException:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion dist/t/spec/support/capybara.rb
Expand Up @@ -24,7 +24,7 @@

# Set hostname
begin
hostname = Socket.gethostbyname(Socket.gethostname).first
hostname = Addrinfo.getaddrinfo(Socket.gethostname, 443, nil, :STREAM).first.getnameinfo[0]
rescue SocketError
hostname = ''
end
Expand Down

0 comments on commit 492f24a

Please sign in to comment.