summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/signal.c b/signal.c
index ee0c9306..d0b0981 100644
--- a/signal.c
+++ b/signal.c
@@ -202,13 +202,13 @@ rb_f_kill(argc, argv)
switch (TYPE(argv[0])) {
case T_FIXNUM:
sig = FIX2UINT(argv[0]);
- if (sig >= NSIG) {
- s = rb_id2name(sig);
- if (!s) rb_raise(rb_eArgError, "bad signal");
- goto str_signal;
- }
break;
+ case T_SYMBOL:
+ s = rb_id2name(SYM2ID(argv[0]));
+ if (!s) rb_raise(rb_eArgError, "bad signal");
+ goto str_signal;
+
case T_STRING:
{
s = RSTRING(argv[0])->ptr;