diff --git a/ChangeLog b/ChangeLog index 2cc4a3842b..ec67e59cd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Jun 9 01:11:07 2012 Tanaka Akira + + * include/ruby/intern.h (rb_exec_arg_init): declaration changed to + return a value. + + * process.c (rb_exec_arg_init): return a value. + Fri Jun 8 23:44:14 2012 Tanaka Akira * process.c: don't check the availability of FD_CLOEXEC. It should diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 944c8f4131..05663d9bae 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -608,7 +608,7 @@ struct rb_exec_arg { VALUE dup2_tmpbuf; }; int rb_proc_exec(const char*); -void rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e); +VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e); int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val); void rb_exec_arg_fixup(struct rb_exec_arg *e); int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s); diff --git a/process.c b/process.c index 491366f2b3..2e7b31f2a3 100644 --- a/process.c +++ b/process.c @@ -1850,13 +1850,14 @@ rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, str } } -void +VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e) { VALUE prog; VALUE env = Qnil, opthash = Qnil; prog = rb_exec_getargs(&argc, &argv, accept_shell, &env, &opthash); rb_exec_fillarg(prog, argc, argv, env, opthash, e); + return e->use_shell ? e->invoke.sh.shell_script : e->invoke.cmd.command_name; } static int