Fix some parts of Socket::Option #4038

Merged
merged 5 commits into from Aug 11, 2016

Conversation

Projects
None yet
2 participants
@etehtsea
Contributor

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;

This comment has been minimized.

@etehtsea

etehtsea Jul 29, 2016

Contributor

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

@etehtsea

etehtsea Jul 29, 2016

Contributor

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

etehtsea added some commits Jul 28, 2016

Remove test_bool from excludes. Fixes #2997
- Fix Socket::Option.int
- Fix Socket::Option.bool
- Fix Socket::Option#bool
Remove Socket test_initialize from excludes
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

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@etehtsea etehtsea deleted the etehtsea:socket-options branch Aug 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment