diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-30 14:27:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-30 14:27:15 +0000 |
commit | a0dc245f72afba5889a528074d079d310effeb3b (patch) | |
tree | f697efeda011f089e06705246b7d785068bf0c2b /test/ruby | |
parent | e5a7c2db988db967140da2e11bdf8bb8e85d7769 (diff) | |
download | ruby-a0dc245f72afba5889a528074d079d310effeb3b.tar.gz |
signal.c: preserve encoding
* signal.c (rb_f_kill, trap_signm): preserve argument encoding in
error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_signal.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 70b6c2bb4c..251a12db17 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -73,6 +73,7 @@ class TestSignal < Test::Unit::TestCase def test_invalid_signal_name assert_raise(ArgumentError) { Process.kill(:XXXXXXXXXX, $$) } + assert_raise_with_message(ArgumentError, /\u{30eb 30d3 30fc}/) { Process.kill("\u{30eb 30d3 30fc}", $$) } end if Process.respond_to?(:kill) def test_signal_exception @@ -162,6 +163,7 @@ class TestSignal < Test::Unit::TestCase assert_raise(ArgumentError) { Signal.trap("XXXXXXXXXX", "SIG_DFL") } + assert_raise_with_message(ArgumentError, /\u{30eb 30d3 30fc}/) { Signal.trap("\u{30eb 30d3 30fc}", "SIG_DFL") } ensure Signal.trap(:INT, oldtrap) if oldtrap end |