diff --git a/ChangeLog b/ChangeLog index 41f9c473c5..d631a19925 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jun 23 17:22:02 2012 Tanaka Akira + + * process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS. + (rb_execarg_run_options): ditto. + Sat Jun 23 17:04:08 2012 Tanaka Akira * internal.h (rb_execarg): add env_modification field. diff --git a/process.c b/process.c index 61a0d01aa9..164a5230a5 100644 --- a/process.c +++ b/process.c @@ -2713,7 +2713,8 @@ save_env(struct rb_execarg *sargp) (VALUE)ary); sargp->env_modification = ary; } - rb_ary_store(soptions, EXEC_OPTION_UNSETENV_OTHERS, Qtrue); + sargp->unsetenv_others_given = 1; + sargp->unsetenv_others_do = 1; } } #endif @@ -2751,8 +2752,7 @@ rb_execarg_run_options(const struct rb_execarg *eargp, struct rb_execarg *sargp, #endif #if !defined(HAVE_FORK) - obj = rb_ary_entry(options, EXEC_OPTION_UNSETENV_OTHERS); - if (RTEST(obj)) { + if (eargp->unsetenv_others_given && eargp->unsetenv_others_do) { save_env(sargp); rb_env_clear(); }