/cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:507:in `new': Invalid
argument - "connect(2)"(Errno::EINVAL)
This has been fixed in the development version of ruby. The required change
is in socket.c. I don't know how to use patch but here is the fix without
patch.
In ruby_connect,
-- existing:
#ifdef EINPROGRESS
case EINPROGRESS:
-- fix:
#if defined __CYGWIN__
{
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 100000;
rb_thread_wait_for(tv);
}
#endif
-- existing:
#endif