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:
parent
4525cf2cd5
commit
82d63fcaac
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue