diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-03 18:14:56 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-03 18:14:56 +0000 |
commit | ba5b713682bb47244324da2dcd5c879da9288319 (patch) | |
tree | c515d33ad074b50f52e79093022de6128acea0be /test | |
parent | de6c5ae9c69474e9d04ecc085fa08136fb13dea0 (diff) |
merge revision(s) 61507: [Backport #14247]
Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@61583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 3695f6e4ea..591292962d 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -557,7 +557,9 @@ class TestThread < Test::Unit::TestCase assert_equal(3, t.fetch("qux") {x = 3}) assert_equal(3, x) - assert_raise(KeyError) {t.fetch(:qux)} + e = assert_raise(KeyError) {t.fetch(:qux)} + assert_equal(:qux, e.key) + assert_equal(t, e.receiver) ensure t.kill if t end |