aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/language/break_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/break_spec.rb')
-rw-r--r--spec/ruby/language/break_spec.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/ruby/language/break_spec.rb b/spec/ruby/language/break_spec.rb
index 794eed2dd9..da3c3bd272 100644
--- a/spec/ruby/language/break_spec.rb
+++ b/spec/ruby/language/break_spec.rb
@@ -63,15 +63,14 @@ describe "The break statement in a captured block" do
describe "from another thread" do
it "raises a LocalJumpError when getting the value from another thread" do
- ScratchPad << :a
thread_with_break = Thread.new do
- ScratchPad << :b
- break :break
- ScratchPad << :c
+ begin
+ break :break
+ rescue LocalJumpError => e
+ e
+ end
end
-
- lambda { thread_with_break.value }.should raise_error(LocalJumpError)
- ScratchPad.recorded.should == [:a, :b]
+ thread_with_break.value.should be_an_instance_of(LocalJumpError)
end
end
end