diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-29 17:08:48 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-29 17:08:48 +0000 |
commit | 9df121034a09aced529bf50e0ae2226baaaeb925 (patch) | |
tree | 38fc9a9c53b8fa832d1ec618c7e3d65055d69291 /signal.c | |
parent | 1f97d48800a1bc4f4831036100857b491d36680c (diff) | |
download | ruby-9df121034a09aced529bf50e0ae2226baaaeb925.tar.gz |
* signal.c (esignal_init): handle a non-integer argument correctly,
allowing SignalException.new(:INT).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)", |