summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 19:09:11 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 19:09:11 +0000
commit29f5911cf54536f06697aea6e0a5c98977c536e9 (patch)
tree0a58f150eb4a39f0d3f038ee47335ccbf22f2279 /signal.c
parentce80820c0cb75a8314d3dfa0b1cad7ee715d9adb (diff)
* signal.c (signal_exec): execute rb_eval_cmd() directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/signal.c b/signal.c
index 34a8175a9d..027a117c15 100644
--- a/signal.c
+++ b/signal.c
@@ -565,13 +565,8 @@ sigpipe(int sig)
static void
signal_exec(VALUE cmd, int safe, int sig)
{
- VALUE signumary = rb_ary_new3(1, INT2FIX(sig));
-
- if (TYPE(cmd) == T_STRING) {
- rb_eval_cmd(cmd, signumary, safe);
- return;
- }
- rb_proc_call(cmd, signumary);
+ VALUE signum = INT2NUM(sig);
+ rb_eval_cmd(cmd, rb_ary_new3(1, signum), safe);
}
void