"factor-test-key-change" os-env
] unit-test
[ ] [ "factor-test-key-change" unset-os-env ] unit-test
+
+! Issue #794, setting something to ``f`` is a memory protection fault on mac
+[ ] [ f "dummy-env-variable-for-factor-test" set-os-env ] unit-test
M: unix os-env ( key -- value ) getenv ;
-M: unix set-os-env ( value key -- ) swap 1 setenv io-error ;
+M: unix set-os-env ( value key -- )
+ over [
+ swap 1 setenv io-error
+ ] [
+ nip unset-os-env
+ ] if ;
M: unix unset-os-env ( key -- ) unsetenv io-error ;