diff options
Diffstat (limited to 'test/test_timeout.rb')
-rw-r--r-- | test/test_timeout.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb index 71edc65c51..08885cd54f 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -57,4 +57,14 @@ class TestTimeout < Test::Unit::TestCase end assert_raise_with_message(exc, /execution expired/) {raise e if e} end + + def test_custom_exception + bug9354 = '[ruby-core:59511] [Bug #9354]' + err = Class.new(StandardError) do + def initialize(msg) super end + end + assert_nothing_raised(ArgumentError, bug9354) do + assert_equal(:ok, timeout(100, err) {:ok}) + end + end end |