mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
1f97d48800
commit
9df121034a
2 changed files with 6 additions and 0 deletions
|
@ -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>
|
Fri May 30 00:59:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* test/ruby/test_regexp.rb: add tests.
|
* test/ruby/test_regexp.rb: add tests.
|
||||||
|
|
1
signal.c
1
signal.c
|
@ -222,6 +222,7 @@ esignal_init(int argc, VALUE *argv, VALUE self)
|
||||||
if (argc > 0) {
|
if (argc > 0) {
|
||||||
sig = rb_check_to_integer(argv[0], "to_int");
|
sig = rb_check_to_integer(argv[0], "to_int");
|
||||||
if (!NIL_P(sig)) argnum = 2;
|
if (!NIL_P(sig)) argnum = 2;
|
||||||
|
else sig = argv[0];
|
||||||
}
|
}
|
||||||
if (argc < 1 || argnum < argc) {
|
if (argc < 1 || argnum < argc) {
|
||||||
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
|
||||||
|
|
Loading…
Reference in a new issue