Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some parts of Socket::Option #4038

Merged
merged 5 commits into from
Aug 11, 2016
Merged

Conversation

etehtsea
Copy link
Contributor

@etehtsea etehtsea commented Jul 29, 2016

Specs passed, so, hopefully, it should work.

P.S. Also I wanted to fix Socket.linger, but it requires more substantial changes and I put it aside for a while.

Disclaimer:
1 sntxfelfuqlsfdnvzkj6ia

I will be happy to see some feedback how it could be improved.

ProtocolFamily family = SocketUtils.protocolFamilyFromArg(args[0]);
SocketLevel level = RubyBasicSocket.levelFromArg(args[1]);
SocketOption option = RubyBasicSocket.optionFromArg(args[2]);
int intData = args[3].isTrue() ? 1 : 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be checked there that it actually a boolean arg and what to do in case if it's not?

- Fix Socket::Option.int
- Fix Socket::Option.bool
- Fix Socket::Option#bool
Fix socket initialization with type passed as a string (for ex.
'SOCK_STREAM')
@enebo enebo added this to the JRuby 9.1.3.0 milestone Aug 11, 2016
@enebo enebo added the core label Aug 11, 2016
@enebo enebo merged commit 1482ff8 into jruby:master Aug 11, 2016
@etehtsea etehtsea deleted the socket-options branch August 11, 2016 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants