Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6b0d84bd689a
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a55825011441
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Aug 25, 2015

  1. Copy the full SHA
    66dd42b View commit details
  2. Copy the full SHA
    c1f9d00 View commit details
  3. Copy the full SHA
    a558250 View commit details

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
fails:BasicSocket#getsockopt gets a socket option Socket::SO_TYPE
fails:BasicSocket#getsockopt gets a socket option Socket::SO_OOBINLINE
fails:BasicSocket#getsockopt gets a socket option Socket::SO_LINGER
fails:BasicSocket#getsockopt gets a socket option Socket::SO_SNDBUF
fails:BasicSocket#getsockopt raises a SystemCallError with an invalid socket option
8 changes: 0 additions & 8 deletions spec/truffle/tags/library/socket/socket/bind_tags.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
fails:Socket#bind on SOCK_DGRAM socket binds to a port
fails:Socket#bind on SOCK_DGRAM socket returns 0 if successful
fails:Socket#bind on SOCK_DGRAM socket raises Errno::EINVAL when binding to an already bound port
fails:Socket#bind on SOCK_DGRAM socket raises Errno::EADDRNOTAVAIL when the specified sockaddr is not available from the local machine
fails:Socket#bind on SOCK_DGRAM socket raises Errno::EACCES when the current user does not have permission to bind
fails:Socket#bind on SOCK_STREAM socket binds to a port
fails:Socket#bind on SOCK_STREAM socket returns 0 if successful
fails:Socket#bind on SOCK_STREAM socket raises Errno::EINVAL when binding to an already bound port
fails:Socket#bind on SOCK_STREAM socket raises Errno::EADDRNOTAVAIL when the specified sockaddr is not available from the local machine
fails:Socket#bind on SOCK_STREAM socket raises Errno::EACCES when the current user does not have permission to bind
7 changes: 0 additions & 7 deletions spec/truffle/tags/library/socket/socket/getnameinfo_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -925,6 +925,9 @@ public GetNameInfoNode(RubyContext context, SourceSection sourceSection) {
@CompilerDirectives.TruffleBoundary
@Specialization(guards = {"isRubyPointer(sa)", "isRubyPointer(host)", "isRubyPointer(serv)"})
public int getnameinfo(DynamicObject sa, int salen, DynamicObject host, int hostlen, DynamicObject serv, int servlen, int flags) {
assert hostlen > 0;
assert servlen > 0;

return nativeSockets().getnameinfo(
Layouts.POINTER.getPointer(sa),
salen,
@@ -935,6 +938,38 @@ public int getnameinfo(DynamicObject sa, int salen, DynamicObject host, int host
flags);
}

@CompilerDirectives.TruffleBoundary
@Specialization(guards = {"isRubyPointer(sa)", "isNil(host)", "isRubyPointer(serv)"})
public int getnameinfoNullHost(DynamicObject sa, int salen, DynamicObject host, int hostlen, DynamicObject serv, int servlen, int flags) {
assert hostlen == 0;
assert servlen > 0;

return nativeSockets().getnameinfo(
Layouts.POINTER.getPointer(sa),
salen,
PointerNodes.NULL_POINTER,
hostlen,
Layouts.POINTER.getPointer(serv),
servlen,
flags);
}

@CompilerDirectives.TruffleBoundary
@Specialization(guards = {"isRubyPointer(sa)", "isRubyPointer(host)", "isNil(serv)"})
public int getnameinfoNullService(DynamicObject sa, int salen, DynamicObject host, int hostlen, DynamicObject serv, int servlen, int flags) {
assert hostlen > 0;
assert servlen == 0;

return nativeSockets().getnameinfo(
Layouts.POINTER.getPointer(sa),
salen,
Layouts.POINTER.getPointer(host),
hostlen,
PointerNodes.NULL_POINTER,
servlen,
flags);
}

}

@CoreMethod(names = "socket", isModuleFunction = true, required = 3)