summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index c9d60c7a56..1b3fde2de2 100644
--- a/hash.c
+++ b/hash.c
@@ -3315,6 +3315,9 @@ env_str_new2(const char *ptr)
static int env_path_tainted(const char *);
+static const char TZ_ENV[] = "TZ";
+extern int ruby_tz_update;
+
static rb_encoding *
env_encoding_for(const char *name, const char *ptr)
{
@@ -3396,6 +3399,9 @@ env_delete(VALUE obj, VALUE name)
RB_GC_GUARD(name);
path_tainted = 0;
}
+ else if (ENVMATCH(nam, TZ_ENV)) {
+ ruby_tz_update = 0;
+ }
return value;
}
return Qnil;
@@ -3755,6 +3761,9 @@ env_aset(VALUE obj, VALUE nm, VALUE val)
path_tainted_p(value);
}
}
+ else if (ENVMATCH(name, TZ_ENV)) {
+ ruby_tz_update = 0;
+ }
return val;
}