summaryrefslogtreecommitdiff
path: root/ext/socket/unixsocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/unixsocket.c')
-rw-r--r--ext/socket/unixsocket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index afa47d54f63..24721fbe3d9 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -40,8 +40,8 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
MEMZERO(&sockaddr, struct sockaddr_un, 1);
sockaddr.sun_family = AF_UNIX;
if (sizeof(sockaddr.sun_path) <= (size_t)RSTRING_LEN(path)) {
- rb_raise(rb_eArgError, "too long unix socket path (max: %dbytes)",
- (int)sizeof(sockaddr.sun_path)-1);
+ rb_raise(rb_eArgError, "too long unix socket path (%ldbytes given but %dbytes max)",
+ RSTRING_LEN(path), (int)sizeof(sockaddr.sun_path)-1);
}
memcpy(sockaddr.sun_path, RSTRING_PTR(path), RSTRING_LEN(path));