Skip to content

Commit

Permalink
pack_sockaddr_in should convert a port string
Browse files Browse the repository at this point in the history
Signed-off-by: Hiro Asari <asari.ruby@gmail.com>
  • Loading branch information
geemus authored and BanzaiMan committed Oct 20, 2011
1 parent eba5b2f commit 18a02a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/jruby/ext/socket/RubySocket.java
Expand Up @@ -510,7 +510,7 @@ 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) {
return pack_sockaddr_in(context, recv,
RubyNumeric.fix2int(port),
RubyNumeric.fix2int(Integer.parseInt(port)),
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 18a02a9

Please sign in to comment.