mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_signal.rb (test_signal): restore old trap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
de6f26a296
commit
8405551e6d
2 changed files with 12 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,7 @@
|
|||
Mon Oct 20 11:31:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_signal.rb (test_signal): restore old trap.
|
||||
|
||||
Mon Oct 20 11:00:46 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* gc.c (gc_sweep): loosen page free condition to avoid add_heap()
|
||||
|
@ -77,7 +81,7 @@ Thu Oct 16 23:51:04 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
|||
|
||||
* ext/tk/lib/tk.rb: If $DEBUG == true and some exception is caused
|
||||
in a callback operation, Ruby/Tk shows a (verbose) backtrace
|
||||
information on the callback process.
|
||||
information on the callback process.
|
||||
|
||||
Thu Oct 16 17:09:19 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
|
@ -91,8 +95,8 @@ Thu Oct 16 16:54:57 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
|
||||
Thu Oct 16 16:40:51 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk.rb:
|
||||
Add Tk::EncodedString and Tk::UTF8_String class to support
|
||||
* ext/tk/lib/tk.rb:
|
||||
Add Tk::EncodedString and Tk::UTF8_String class to support
|
||||
characters using the \uXXXX escape to the UNICODE string.
|
||||
|
||||
* ext/tk/sample/{demos-en,demos-jp}/unicodeout.rb
|
||||
|
|
|
@ -4,9 +4,10 @@ $KCODE = 'none'
|
|||
|
||||
class TestSignal < Test::Unit::TestCase
|
||||
def test_signal
|
||||
if defined? Process.kill
|
||||
defined?(Process.kill) or return
|
||||
begin
|
||||
$x = 0
|
||||
trap "SIGINT", proc{|sig| $x = 2}
|
||||
oldtrap = trap "SIGINT", proc{|sig| $x = 2}
|
||||
Process.kill "SIGINT", $$
|
||||
sleep 0.1
|
||||
assert_equal(2, $x)
|
||||
|
@ -19,6 +20,8 @@ class TestSignal < Test::Unit::TestCase
|
|||
end
|
||||
assert(x)
|
||||
assert_match(/Interrupt/, x.message)
|
||||
ensure
|
||||
trap "SIGINT", oldtrap
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue