----- Original Message ----- 
From: "Mike Campbell" <michael_s_campbell / yahoo.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, June 03, 2003 10:13 PM
Subject: Re: case of sub! not working


> Do I understand this correctly now?
> 
> * no method modifies the parents environment (standard unix behavior)
> 
> * ENV#[]=   modifies the ENV contents, and as such the current and any
> subsequent subprocesses environments through a delegated call to setenv
> (standard unix behavior, and how perl does it with its %ENV hash)
> 
> * ENV#[]#sub! DOESN'T modify the actual ENV contents, nor as such any
> environment; current nor subprocess.

Yes, except there's really no ENV#[]#sub! method, if you know
what I mean... ENV[] simply returns a string, and then you invoke 
the String#sub! method.

And the string has no way of knowing that it came from the
environment, and the ENV object has no way of knowing that
the string object changed.

Hal