Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5b94fc9601
commit
220d2a7182
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user