From: Gennady Bystritksy Date: 2005-01-18T08:37:37+09:00 Subject: Re: Ignoring RUBYOPT ? Erik Veenstra wrote: >>>How can I let Ruby ignore RUBYOPT? >>> >>>Both -T1 and unsetting the environment variable aren't >>>possible in my situation. I don't want the rest of the >>>script to run in safe mode 1 and I don't have control of >>>the environment... >> >>I haven't followed this thread, but since the internal ENV >>only affects the current process and its children, can you >>wrap your program in a script that unsets RUBYOPT and then >>just fork/popen the real program? > > > No, I can't. I start ruby.exe from a little FreePascal program, > which does have getenv(), but no such thing as setenv(). Have you checked for putenv()? > > Using an intermediate .bat file isn't an option, because I > don't want a stupid DOS-box when using rubyw.exe instead of > ruby.exe. > > Mmhh... I might use an intermediate Ruby script to unset the > environment variable... Not pretty, but it might work.... > gegroet, > Erik V. > >