summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-12 22:04:24 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-12 22:04:24 +0000
commit9941f348e056a5e717cb943cee37ba8ba2396e6f (patch)
tree51bb3531e550fa93ca13faa06ce38648f303a45a /ext/socket
parentddf2558a167652cfec6a901b2116b832221e6e83 (diff)
accept_nonblock: favor rb_hash_lookup2 to avoid Hash#default
* ext/socket/init.c (rsock_s_accept_nonblock): use rb_hash_lookup2 * ext/openssl/ossl_ssl.c (get_no_exception): new function (ossl_ssl_accept_nonblock): use get_no_exception (ossl_ssl_read_internal): ditto (ossl_ssl_write_nonblock): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index b94b250..50d3f86 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -516,7 +516,7 @@ rsock_s_accept_nonblock(int argc, VALUE *argv, VALUE klass, rb_io_t *fptr,
rb_scan_args(argc, argv, "0:", &opts);
- if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
+ if (!NIL_P(opts) && Qfalse == rb_hash_lookup2(opts, sym_exception, Qundef))
ex = 0;
rb_secure(3);