[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
Issue #11262 has been updated by J旦rg W Mittag.
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
Issue #12103 has been updated by Martin D端rst.
3 messages
2016/02/27
[ruby-core:74018] [Ruby trunk Feature#12085] [PATCH] OpenSSL::SSL::SSLSocket#write_nonblock: expand documentation
From:
nobu@...
Date:
2016-02-27 08:53:17 UTC
List:
ruby-core #74018
Issue #12085 has been updated by Nobuyoshi Nakada.
Description updated
----------------------------------------
Feature #12085: [PATCH] OpenSSL::SSL::SSLSocket#write_nonblock: expand documentation
https://bugs.ruby-lang.org/issues/12085#change-57171
* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee: Zachary Scott
----------------------------------------
* ext/openssl/lib/openssl/buffering.rb (write_nonblock):
document `exception: false' keyword and warn about retrying
the using the same object.
The following test patch illustrates the problem I encountered:
```diff
--- a/test/openssl/test_pair.rb
+++ b/test/openssl/test_pair.rb
@@ -280,6 +280,33 @@ def test_write_nonblock_with_buffered_data_no_exceptions
}
end
+ def test_write_nonblock_retry
+ ssl_pair {|s1, s2|
+ written = String.new
+ n = 0
+ buf = 'a' * 11
+ case ret = s1.write_nonblock(buf, exception: false)
+ when :wait_readable then break
+ when :wait_writable then break
+ when Integer
+ written << buf
+ n += ret
+ exp = buf.bytesize
+ if ret != exp
+ buf = buf.byteslice(ret, exp - ret)
+ end
+ end while true
+ readed = s2.read(n)
+ assert_equal written, readed
+ assert_kind_of Symbol, ret
+ buf2 = Marshal.load(Marshal.dump(buf))
+ assert_raise(OpenSSL::SSL::SSLError) do
+ s1.write_nonblock(buf2, exception: false)
+ end
+ assert_kind_of Integer, s1.write_nonblock(buf, exception: false)
+ }
+ end
+
def tcp_pair
host = "127.0.0.1"
serv = TCPServer.new(host, 0)
~~~
I do not plan to commit the test change since OpenSSL behavior
may be improved in the future.
---Files--------------------------------
0001-OpenSSL-SSL-SSLSocket-write_nonblock-expand-document.patch (2.84 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>