mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05: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
|
@ -1,3 +1,10 @@
|
|||
Wed Jan 30 15:26:37 2013 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* 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.
|
||||
|
||||
Wed Jan 30 15:21:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_dump.c (rb_vm_bugreport): show the most important message, Crash
|
||||
|
|
|
@ -66,7 +66,7 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
|
|||
|
||||
if (status < 0) {
|
||||
close(fd);
|
||||
rb_sys_fail_str(path);
|
||||
rb_sys_fail_str(rb_inspect(path));
|
||||
}
|
||||
|
||||
if (server) {
|
||||
|
|
|
@ -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…
Reference in a new issue