From 8c5b60eb22d6d661e87992a65d54e3a5bc0aeed4 Mon Sep 17 00:00:00 2001 From: eregon Date: Sat, 28 Oct 2017 15:15:48 +0000 Subject: Update to ruby/spec@a6b8805 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/library/socket/unixserver/accept_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/ruby/library/socket/unixserver') diff --git a/spec/ruby/library/socket/unixserver/accept_spec.rb b/spec/ruby/library/socket/unixserver/accept_spec.rb index 90b22d7eb1..3921dadd9d 100644 --- a/spec/ruby/library/socket/unixserver/accept_spec.rb +++ b/spec/ruby/library/socket/unixserver/accept_spec.rb @@ -48,14 +48,14 @@ platform_is_not :windows do it "can be interrupted by Thread#raise" do t = Thread.new { - @server.accept + -> { + @server.accept + }.should raise_error(Exception, "interrupted") } - Thread.pass while t.status and t.status != "sleep" - # raise in thread, ensure the raise happens - ex = Exception.new - t.raise ex - lambda { t.join }.should raise_error(Exception) + Thread.pass while t.status and t.status != "sleep" + t.raise Exception, "interrupted" + t.join end end end -- cgit v1.2.3