aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-03-31 15:10:40 +1300
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-03-31 15:10:40 +1300
commit8ea628dfac28ab63870900f29d9a788ce5c0129b (patch)
tree6fcd6a68f3cc33b98330af9d0312d91ce7a522aa /lib
parent95aa0ce9e9c1b95f8c92bb7963485ab2b0329ef0 (diff)
downloadruby-openssl-8ea628dfac28ab63870900f29d9a788ce5c0129b.tar.gz
Prefer generic implementatio in `SocketForwarder`.
Diffstat (limited to 'lib')
-rw-r--r--lib/openssl/ssl.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/openssl/ssl.rb b/lib/openssl/ssl.rb
index ce826cbe..44c737f4 100644
--- a/lib/openssl/ssl.rb
+++ b/lib/openssl/ssl.rb
@@ -231,6 +231,11 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
end
module SocketForwarder
+ # The file descriptor for the socket.
+ def fileno
+ to_io.fileno
+ end
+
def addr
to_io.addr
end
@@ -354,11 +359,6 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
attr_reader :io
alias :to_io :io
- # The file descriptor for the socket.
- def fileno
- @io.fileno
- end
-
# The SSLContext object used in this connection.
attr_reader :context
@@ -469,11 +469,6 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
@svr
end
- # The file descriptor for the server socket.
- def fileno
- @svr.fileno
- end
-
# See TCPServer#listen for details.
def listen(backlog=5)
@svr.listen(backlog)