public static IRubyObject gethostbyname(ThreadContext context, IRubyObject recv, IRubyObject hostname) {
try {
InetAddress addr = InetAddress.getByName(hostname.convertToString().toString());
Ruby runtime = context.getRuntime();
IRubyObject[] ret = new IRubyObject[4];
ret[0] = runtime.newString(addr.getCanonicalHostName());
ret[1] = runtime.newArray();
ret[2] = runtime.newFixnum(2); // AF_INET
ret[3] = runtime.newString(intoString(runtime,addr));
return runtime.newArrayNoCopy(ret);
} catch(UnknownHostException e) {