-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
The spec at https://github.com/rubysl/rubysl-socket/blob/3950231ce2af8a438deeaa6006fd177356149823/spec/basicsocket/getsockopt_spec.rb currently fails with the following output found at https://gist.github.com/YorickPeterse/d98ec87d068f7237220e
Looking at
jruby/core/src/main/java/org/jruby/ext/socket/RubyBasicSocket.java
Lines 670 to 688 in 3c164ca
| protected static SocketOption optionFromArg(IRubyObject _opt) { | |
| SocketOption opt; | |
| if (_opt instanceof RubyString || _opt instanceof RubySymbol) { | |
| opt = SocketOption.valueOf("SO_" + _opt.toString()); | |
| } else { | |
| opt = SocketOption.valueOf(RubyNumeric.fix2int(_opt)); | |
| } | |
| return opt; | |
| } | |
| protected static SocketLevel levelFromArg(IRubyObject _level) { | |
| SocketLevel level; | |
| if (_level instanceof RubyString || _level instanceof RubySymbol) { | |
| level = SocketLevel.valueOf("SOL_" + _level.toString()); | |
| } else { | |
| level = SocketLevel.valueOf(RubyNumeric.fix2int(_level)); | |
| } | |
| return level; | |
| } |
For Rubinius we use the following code to determine the prefixes: https://github.com/rubysl/rubysl-socket/blob/ff68150719df6bedc72ec159fc2e5f166851e800/lib/rubysl/socket/socket_options.rb#L4-L49
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels