> LçÉettçËäº "Erik Veenstra" <google / erikveen.dds.nl> > Aihe: Re: Ignoring RUBYOPT ? > > > > 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(). > > 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.... Right. Have FreePascal run e.g. 'ruby wrapper.rb realprogram.rb args' and then wrapper.rb unsets the var and forks to run realprogram.rb. I think it should work. > gegroet, > Erik V. E