From: Stephen Kellett Date: 2004-12-09T05:47:29+09:00 Subject: Re: Problem using ruby_options() - help! >listening to STDIN. Thats fine. The problem is that when I do pass >arguments Ruby just dies - no crash, nothing, just a silent exit. I've got a solution. I was originally making the following call which was dying. char *rubyArgs[] = { "arg1", "arg2", "arg3", }; ruby_options(sizeof(rubyArgs) / sizeof(rubyArgs[0]), rubyArgs); I built the ruby source and stepped through ruby_options() - it did various strange things like calling ruby_script(args[0]) - thus overwriting the value I'd already set, then later is message about with args[1] and called ruby_script() on that messed about value, finally it tried to load a file with the value of args[1]. That action failed and ruby bailed out with an internal load error. Hence my problem. Whilst doing the above I noticed the call ruby_set_argv(). A few tests later and I conclude that the correct way to pass arguments to a Ruby program, so far as I can tell is using ruby_set_argv(count, args); Hope that helps someone, most likely using Google Groups to get themselves out of this hole. Thanks to those that replied trying to help me. Stephen -- Stephen Kellett Object Media Limited http://www.objmedia.demon.co.uk RSI Information: http://www.objmedia.demon.co.uk/rsi.html