Skip to content

Commit

Permalink
Modified fix for Pull Request jruby#85 jruby#85
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Oct 25, 2011
1 parent 53052f0 commit 9dcd388
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/jruby/ext/socket/RubySocket.java
Expand Up @@ -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) {
Expand Down

0 comments on commit 9dcd388

Please sign in to comment.