summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
committerH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
commitd0b3651906aa943423e430a61437a42f7dd39422 (patch)
tree9d8c8beee149c50f44406ee8cd6dee4c3913c28f /hash.c
parentceade7b9268e9620b123843afeb25a7136f8a576 (diff)
new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index f6d19acdcd..43fbd284f2 100644
--- a/hash.c
+++ b/hash.c
@@ -949,7 +949,11 @@ env_delete(obj, name)
VALUE value = rb_tainted_str_new2(val);
ruby_setenv(nam, 0);
+#ifdef __BORLANDC__
+ if (strcmpi(nam, "PATH") == 0 && !OBJ_TAINTED(name)) {
+#else
if (strcmp(nam, "PATH") == 0 && !OBJ_TAINTED(name)) {
+#endif
path_tainted = 0;
}
return value;
@@ -979,7 +983,11 @@ rb_f_getenv(obj, name)
}
env = getenv(nam);
if (env) {
+#ifdef __BORLANDC__
+ if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted())
+#else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
+#endif
return rb_str_new2(env);
return rb_tainted_str_new2(env);
}
@@ -1013,7 +1021,11 @@ env_fetch(argc, argv)
}
return if_none;
}
+#ifdef __BORLANDC__
+ if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted())
+#else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
+#endif
return rb_str_new2(env);
return rb_tainted_str_new2(env);
}