зеркало из https://github.com/github/ruby.git
* signal.c (trap_handler): also accepts symbols. [ruby-dev:37823]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
770d89c5fa
Коммит
9e22c8390c
|
@ -1,3 +1,7 @@
|
|||
Fri Jan 23 13:26:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* signal.c (trap_handler): also accepts symbols. [ruby-dev:37823]
|
||||
|
||||
Thu Jan 22 18:14:04 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (create_makefile): removes installed files under
|
||||
|
|
4
signal.c
4
signal.c
|
@ -753,6 +753,10 @@ trap_handler(VALUE *cmd, int sig)
|
|||
}
|
||||
else {
|
||||
command = rb_check_string_type(*cmd);
|
||||
if (NIL_P(command) && SYMBOL_P(*cmd)) {
|
||||
command = rb_id2str(SYM2ID(*cmd));
|
||||
if (!command) rb_raise(rb_eArgError, "bad handler");
|
||||
}
|
||||
if (!NIL_P(command)) {
|
||||
SafeStringValue(command); /* taint check */
|
||||
*cmd = command;
|
||||
|
|
Загрузка…
Ссылка в новой задаче