C
Clifford Heath
Under Windows XP (using cygwin's bash, but native Ruby), I
found the following six-legged feature:
$ ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]
$ unset FOO; env|grep FOO; ruby -e 'p ENV["FOO"]'
nil
$ FOO= env |grep FOO
FOO=
$ FOO= ruby -e 'p ENV["FOO"]'
nil
$ FOO=xyz ruby -e 'p ENV["FOO"]'
xyz
$
The problem is that ENV doesn't contain the key FOO in
the 2nd case, where the value is zero-length.
What possible justification could there be for this behaviour?
Clifford Heath.
found the following six-legged feature:
$ ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]
$ unset FOO; env|grep FOO; ruby -e 'p ENV["FOO"]'
nil
$ FOO= env |grep FOO
FOO=
$ FOO= ruby -e 'p ENV["FOO"]'
nil
$ FOO=xyz ruby -e 'p ENV["FOO"]'
xyz
$
The problem is that ENV doesn't contain the key FOO in
the 2nd case, where the value is zero-length.
What possible justification could there be for this behaviour?
Clifford Heath.