Commit cf827ab0 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

fix Addrinfo.getaddrinfo("127.0.0.1", nil).

Closes #2
parent 216e3275
......@@ -58,7 +58,7 @@ mrb_addrinfo_getaddrinfo(mrb_state *mrb, mrb_value klass)
servname = mrb_str_to_cstr(mrb, service);
} else if (mrb_fixnum_p(service)) {
servname = mrb_str_to_cstr(mrb, mrb_funcall(mrb, service, "to_s", 0));
} else if (mrb_nil_p(nodename)) {
} else if (mrb_nil_p(service)) {
servname = NULL;
} else {
mrb_raise(mrb, E_TYPE_ERROR, "service must be String, Fixnum, or nil");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment