summaryrefslogtreecommitdiff
path: root/ext/socket/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-15 00:27:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-15 00:27:47 +0900
commit71dd8b3caa6462e5c3dfd7059314459b51ebebc0 (patch)
treec52352fc6a11afbdf4d22d648b12ff8eebe15ad2 /ext/socket/lib
parent9eb19a02aea2f867972d2c28cab25e5df162091f (diff)
socket.rb - simplify check for the method
Diffstat (limited to 'ext/socket/lib')
-rw-r--r--ext/socket/lib/socket.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index 6e1e78b809..1c091650ff 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'socket.so'
-require 'io/wait' unless ::IO.public_instance_methods(false).include? :wait_readable
+require 'io/wait' unless ::IO.method_defined?(:wait_readable, false)
class Addrinfo
# creates an Addrinfo object from the arguments.