diff options
Diffstat (limited to 'spec/ruby/core/thread/element_set_spec.rb')
-rw-r--r-- | spec/ruby/core/thread/element_set_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/thread/element_set_spec.rb b/spec/ruby/core/thread/element_set_spec.rb index 47b4d06328..b76078f685 100644 --- a/spec/ruby/core/thread/element_set_spec.rb +++ b/spec/ruby/core/thread/element_set_spec.rb @@ -9,12 +9,12 @@ describe "Thread#[]=" do it "raises a RuntimeError if the thread is frozen" do running = false t = Thread.new do - Thread.pass until running t.freeze - t[:foo] = "bar" + -> { + t[:foo] = "bar" + }.should raise_error(RuntimeError, /frozen/) end - running = true - lambda { t.join }.should raise_error(RuntimeError) + t.join end it "raises exceptions on the wrong type of keys" do |