[前][次][番号順一覧][スレッド一覧]

ruby-changes:33810

From: nobu <ko1@a...>
Date: Sat, 10 May 2014 00:13:27 +0900 (JST)
Subject: [ruby-changes:33810] nobu:r45891 (trunk): test_beginendblock.rb, test_signal.rb: run with default handler

nobu	2014-05-10 00:13:11 +0900 (Sat, 10 May 2014)

  New Revision: 45891

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45891

  Log:
    test_beginendblock.rb, test_signal.rb: run with default handler
    
    * test/ruby/test_beginendblock.rb (test_propagate_signaled): run
      with default handler.
    
    * test/ruby/test_signal.rb (test_hup_me): ditto.

  Modified files:
    trunk/test/ruby/test_beginendblock.rb
    trunk/test/ruby/test_signal.rb
Index: test/ruby/test_beginendblock.rb
===================================================================
--- test/ruby/test_beginendblock.rb	(revision 45890)
+++ test/ruby/test_beginendblock.rb	(revision 45891)
@@ -112,6 +112,7 @@ EOW https://github.com/ruby/ruby/blob/trunk/test/ruby/test_beginendblock.rb#L112
     ruby = EnvUtil.rubybin
     out = IO.popen(
       [ruby,
+       '-e', 'trap(:INT, "DEFAULT")',
        '-e', 'STDERR.reopen(STDOUT)',
        '-e', 'at_exit{Process.kill(:INT, $$); sleep 5 }']) {|f|
       timeout(10) {
Index: test/ruby/test_signal.rb
===================================================================
--- test/ruby/test_signal.rb	(revision 45890)
+++ test/ruby/test_signal.rb	(revision 45891)
@@ -256,9 +256,12 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_signal.rb#L256
     # that signal will be deliverd synchronously.
     # This ugly workaround was introduced to don't break
     # compatibility against silly example codes.
+    assert_separately(<<-RUBY)
+    trap(:HUP, "DEFAULT")
     assert_raise(SignalException) {
       Process.kill('HUP', Process.pid)
     }
+    RUBY
     bug8137 = '[ruby-dev:47182] [Bug #8137]'
     assert_nothing_raised(bug8137) {
       Timeout.timeout(1) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]