lib/rubysl/socket/socket.rb in rubysl-socket-1.0.0 vs lib/rubysl/socket/socket.rb in rubysl-socket-1.0.1
- old
+ new
@@ -615,15 +615,15 @@
sockaddr = Socket.sockaddr_in(1, a[3])
if family == AF_INET
# IPv4 address
offset = FFI.config("sockaddr_in.sin_addr.offset")
size = FFI.config("sockaddr_in.sin_addr.size")
- addresses << sockaddr.byteslice(offset, size)
+ addresses << sockaddr.slice(offset, size)
elsif family == AF_INET6
# Ipv6 address
offset = FFI.config("sockaddr_in6.sin6_addr.offset")
size = FFI.config("sockaddr_in6.sin6_addr.size")
- addresses << sockaddr.byteslice(offset, size)
+ addresses << sockaddr.slice(offset, size)
else
addresses << a[3]
end
end
end