summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--signal.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e6148d726e..61baa342737 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 30 02:08:20 2008 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * signal.c (esignal_init): handle a non-integer argument correctly,
+ allowing SignalException.new(:INT).
+
Fri May 30 00:59:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_regexp.rb: add tests.
diff --git a/signal.c b/signal.c
index 3c341358b03..65e35a062fc 100644
--- a/signal.c
+++ b/signal.c
@@ -222,6 +222,7 @@ esignal_init(int argc, VALUE *argv, VALUE self)
if (argc > 0) {
sig = rb_check_to_integer(argv[0], "to_int");
if (!NIL_P(sig)) argnum = 2;
+ else sig = argv[0];
}
if (argc < 1 || argnum < argc) {
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",