Re: In Windows, :ruby command is not works around socket
In case, that subject will not be correctly recognized by mail clients, I'm trying to continue old thread In Windows, :ruby command is not works around socket [1]: 1 Jul., 04:00 todesking wrote: I found a ruby command's bug on Windows VIM. :ruby require 'open-uri' :ruby open('http://google.com/') = SocketError: `initialize': getaddrinfo: non-recoverable failure in name resolution. :ruby open('http://66.249.89.147') = vim dies I can confirm that bug still persist in recent VIM (7.2, Included patches: 1-69). I can confirm as well, that proposed patch fixes that (I have modified this according Bram's proposal with initialization of argc = 1 and removing typecasting). -- Anton [1] Original thread In Windows, :ruby command is not works around socket http://groups.google.com/group/vim_dev/browse_thread/thread/528607752ef92e68 --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: In Windows, :ruby command is not works around socket
I found a ruby command's bug on Windows VIM. :ruby require 'open-uri' :ruby open('http://google.com/') = SocketError: `initialize': getaddrinfo: non-recoverable failure in name resolution. :ruby open('http://66.249.89.147') = vim dies In Windows, NtInitialize() should called when initializing Ruby. Otherwise, socket is never initialized. Here is patch. Thanks for looking into this. I don't include patches without knowing the name of the author. If you are scared you can mail me directly. About this part: #ifdef _WIN32 int argc; char *argv[] = {gvim.exe}; NtInitialize(argc, (char***)argv); #endif I think argc should be set to 1. Typecasting should not be needed for argv. How about this instead: #ifdef _WIN32 int argc = 1; char *argv[] = {gvim.exe}; NtInitialize(argc, argv); #endif -- hundred-and-one symptoms of being an internet addict: 131. You challenge authority and society by portnuking people /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---