1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplify Thread#[]= spec

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-12-21 09:29:18 +00:00
parent 4525cf2cd5
commit 82d63fcaac

View file

@ -7,15 +7,13 @@ describe "Thread#[]=" do
end
it "raises a RuntimeError if the thread is frozen" do
running = false
t = Thread.new do
Thread.new do
th = Thread.current
th.freeze
-> {
th[:foo] = "bar"
}.should raise_error(RuntimeError, /frozen/)
end
t.join
end.join
end
it "raises exceptions on the wrong type of keys" do