Project

General

Profile

Feature #1038

Signal.trapのcommandにSymbol

Added by znz (Kazuhiro NISHIYAMA) over 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-dev:37823]

Description

=begin
Signal.trapの第1引数のsignalの方はSymbolでも受け付けるので
第2引数のcommandの方も"SIG_IGN"などをStringだけではなく
Symbolでも受け付けるようにしてほしいです。

% ruby-trunk -ve 'Signal.trap(:CHLD,:IGNORE);fork{exec("true")};sleep 1'
ruby 1.9.1p5000 (2009-01-21 trunk 21717) [i686-linux]
-e:1:in sleep': undefined methodcall' for :IGNORE:Symbol (NoMethodError)
from -e:1:in `'
% ruby-trunk -ve 'Signal.trap(:CHLD,"IGNORE");fork{exec("true")};sleep 1'
ruby 1.9.1p5000 (2009-01-21 trunk 21717) [i686-linux]
%
=end

Also available in: Atom PDF