From: Eric Christopherson Date: 2013-06-05T04:46:25+09:00 Subject: Re: how to implement a UNIX 'export' in Ruby --047d7b4179b3139c0c04de59568e Content-Type: text/plain; charset=UTF-8 On Tue, Jun 4, 2013 at 1:30 PM, Thomas Luedeke wrote: > I've been googling and getting nowhere on this, and I find it an > extremely confusing topic - the use of environment variables in Ruby, > compared to UNIX. > > I've converted some obsolescent UNIX scripts (used to perform > verification and validation of computer codes) into Ruby. I'm now > running into the problem that I need to set an environment variable on > the g95 compiler to get the test cases to run correctly. > > So in the UNIX script, they use something like "export > G95_MINUS_ZERO=true". > > How in the world do I implement something like this in Ruby? Is it as > simple as: > > ENV['G95_MINUS_ZERO'] = "true" Have you tried it? I don't have g95, but a similar test case worked for me. --047d7b4179b3139c0c04de59568e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Jun 4, 2013 at 1:30 PM, Thomas Luedeke <list= s@ruby-forum.com> wrote:
I've been googling and getting nowhere o= n this, and I find it an
extremely confusing topic - the use of environment variables in Ruby,
compared to UNIX.

I've converted some obsolescent UNIX scripts (used to perform
verification and validation of computer codes) into Ruby. =C2=A0I'm now=
running into the problem that I need to set an environment variable on
the g95 compiler to get the test cases to run correctly.

So in the UNIX script, they use something like "export
G95_MINUS_ZERO=3Dtrue".

How in the world do I implement something like this in Ruby? =C2=A0Is it as=
simple as:

ENV['G95_MINUS_ZERO'] =3D "true"

Have you tried it? I don't have g95, but a similar test c= ase worked for me.=C2=A0
--047d7b4179b3139c0c04de59568e--