aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/openssl/lib/openssl/ssl.rb6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cd226dd671..6aeadc16e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 4 09:52:02 2015 Eric Wong <e@80x24.org>
+
+ * ext/openssl/lib/openssl/ssl.rb: use io/nonblock instead of fcntl
+ [ruby-core:69382] [Feature #11190]
+
Thu Jun 4 07:22:45 2015 Koichi Sasada <ko1@atdot.net>
* method.h: introduce rb_method_refined_t for refined method entry.
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb
index 0cab141e24..cc956fa6b5 100644
--- a/ext/openssl/lib/openssl/ssl.rb
+++ b/ext/openssl/lib/openssl/ssl.rb
@@ -15,7 +15,7 @@
=end
require "openssl/buffering"
-require "fcntl"
+require "io/nonblock"
module OpenSSL
module SSL
@@ -126,9 +126,7 @@ module OpenSSL
module Nonblock
def initialize(*args)
- flag = File::NONBLOCK
- flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL)
- @io.fcntl(Fcntl::F_SETFL, flag)
+ @io.nonblock = true if @io.respond_to?(:nonblock=)
super
end
end