mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
* ext/socket/unixsocket.c (rsock_init_unixsock): use rb_inspect()
because rb_sys_fail_str() fails if its argument contains NUL. * test/socket/test_unix.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5efb130d39
commit
e16b8482c7
3 changed files with 16 additions and 1 deletions
|
@ -548,6 +548,14 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
|
|||
assert(s0.closed?)
|
||||
end
|
||||
|
||||
def test_abstract_unix_socket_econnrefused
|
||||
return if /linux/ !~ RUBY_PLATFORM
|
||||
name = "\0ruby-test_unix"
|
||||
assert_raise(Errno::ECONNREFUSED) do
|
||||
UNIXSocket.open(name) {}
|
||||
end
|
||||
end
|
||||
|
||||
def test_abstract_unix_server_socket
|
||||
return if /linux/ !~ RUBY_PLATFORM
|
||||
name = "\0ruby-test_unix"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue