From ba5b713682bb47244324da2dcd5c879da9288319 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 3 Jan 2018 18:14:56 +0000 Subject: 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 --- test/ruby/test_thread.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/ruby') 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 -- cgit v1.2.3