Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modified fix for Pull Request #85 #85

  • Loading branch information...
commit 9dcd3885dd165f04df36f1879da013855131a9ba 1 parent 53052f0
@BanzaiMan BanzaiMan authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/org/jruby/ext/socket/RubySocket.java
View
3  src/org/jruby/ext/socket/RubySocket.java
@@ -509,8 +509,9 @@ public static IRubyObject pack_sockaddr_in(IRubyObject recv, IRubyObject port, I
}
@JRubyMethod(name = {"pack_sockaddr_in", "sockaddr_in"}, meta = true)
public static IRubyObject pack_sockaddr_in(ThreadContext context, IRubyObject recv, IRubyObject port, IRubyObject host) {
+ int portNum = port instanceof RubyString ? Integer.parseInt(port.convertToString().toString()): RubyNumeric.fix2int(port);
return pack_sockaddr_in(context, recv,
- RubyNumeric.fix2int(port),
+ portNum,
host.isNil() ? null : host.convertToString().toString());
}
public static IRubyObject pack_sockaddr_in(ThreadContext context, IRubyObject recv, int iport, String host) {
Please sign in to comment.
Something went wrong with that request. Please try again.