summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-15 14:33:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-15 14:33:59 +0000
commitcb610e89e07ab6502e110a46238e281f3c3ff7f2 (patch)
tree3bab2707c110423ff12a38e58395dd2db7598f56
parent48e13f9a36c4471fc9c2b78bae080f8fff3d16c1 (diff)
downloadruby-cb610e89e07ab6502e110a46238e281f3c3ff7f2.tar.gz
ruby-cb610e89e07ab6502e110a46238e281f3c3ff7f2.tar.xz
ruby-cb610e89e07ab6502e110a46238e281f3c3ff7f2.zip
fix trap's doc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--signal.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/signal.c b/signal.c
index a16f18265..af998b40c 100644
--- a/signal.c
+++ b/signal.c
@@ -851,21 +851,22 @@ rb_trap_restore_mask(void)
/*
* call-seq:
- * Signal.trap( signal, proc ) => obj
+ * Signal.trap( signal, command ) => obj
* Signal.trap( signal ) {| | block } => obj
*
* Specifies the handling of signals. The first parameter is a signal
* name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a
* signal number. The characters ``SIG'' may be omitted from the
* signal name. The command or block specifies code to be run when the
- * signal is raised. If the command is the string ``IGNORE'' or
- * ``SIG_IGN'', the signal will be ignored. If the command is
- * ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler
- * will be invoked. If the command is ``EXIT'', the script will be
- * terminated by the signal. Otherwise, the given command or block
- * will be run.
+ * signal is raised.
+ * If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal
+ * will be ignored.
+ * If the command is ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler
+ * will be invoked.
+ * If the command is ``EXIT'', the script will be terminated by the signal.
* If the command is ``SYSTEM_DEFAULT'', the operating system's default
* handler will be invoked.
+ * Otherwise, the given command or block will be run.
* The special signal name ``EXIT'' or signal number zero will be
* invoked just prior to program termination.
* trap returns the previous handler for the given signal.