[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

trouble with ruby_options() on win32 and ruby 1.8.2

David Craine

1/18/2005 8:42:00 PM

I'm trying to embed ruby into a win32 application; however, when
calling the ruby_options() method my process simply hangs. I am trying
to use ruby_options() to pass the -C argument to ruby to set the
current directory. My code looks like this:

UINT launchRuby()
{
char *argv[3] =
{
"ruby",
"-C..\\Release",
"test.rb"
}

ruby_init();
ruby_options(3, argv);
ruby_run();
}

My program compiles and links properly; however, when I run it it just
hangs right after the ruby_options() call (I've integrated some
diagnostic code to determine this). This same technique worked fine on
OSX, so I'm wondering if there is some issue with the Windows platform.




1 Answer

nobu.nokada

1/21/2005 4:56:00 PM

0

Hi,

At Wed, 19 Jan 2005 05:41:58 +0900,
David Craine wrote in [ruby-talk:127054]:
> I'm trying to embed ruby into a win32 application; however, when
> calling the ruby_options() method my process simply hangs. I am trying
> to use ruby_options() to pass the -C argument to ruby to set the
> current directory. My code looks like this:

Which version do you use? Since last november, ruby_options()
ignores argc and argv on win32, and reads the command line from
the system.

--
Nobu Nakada