ruby-changes:10282
From: yugui <ko1@a...>
Date: Wed, 28 Jan 2009 18:23:06 +0900 (JST)
Subject: [ruby-changes:10282] Ruby:r21827 (ruby_1_9_1): merges r21746 from trunk into ruby_1_9_1.
yugui 2009-01-28 18:22:07 +0900 (Wed, 28 Jan 2009) New Revision: 21827 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21827 Log: merges r21746 from trunk into ruby_1_9_1. * signal.c (trap_handler): also accepts symbols. [ruby-dev:37823] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/signal.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21826) +++ ruby_1_9_1/ChangeLog (revision 21827) @@ -1,3 +1,7 @@ +Fri Jan 23 13:26:45 2009 Nobuyoshi Nakada <nobu@r...> + + * signal.c (trap_handler): also accepts symbols. [ruby-dev:37823] + Thu Jan 22 18:14:04 2009 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (create_makefile): removes installed files under Index: ruby_1_9_1/signal.c =================================================================== --- ruby_1_9_1/signal.c (revision 21826) +++ ruby_1_9_1/signal.c (revision 21827) @@ -753,6 +753,10 @@ } 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/