summaryrefslogtreecommitdiff
path: root/test/cgi/update_env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/cgi/update_env.rb')
-rw-r--r--test/cgi/update_env.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cgi/update_env.rb b/test/cgi/update_env.rb
new file mode 100644
index 00000000000..0cd926d7af4
--- /dev/null
+++ b/test/cgi/update_env.rb
@@ -0,0 +1,8 @@
+module UpdateEnv
+ def update_env(environ)
+ environ.each do |key, val|
+ @environ[key] = ENV[key] unless @environ.key?(key)
+ ENV[key] = val
+ end
+ end
+end