summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-05-31 18:22:49 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-05-31 18:22:49 +0200
commit34776105c8a6739ca3aad1de4a2c942f4a8f2f29 (patch)
tree0103cf2cc89c1322d8c3e88fff0a80b54db8320b /spec/ruby/library/net
parentf4502b001a665109bf776f9037ecbc52cb5f2d88 (diff)
Update to ruby/spec@4e486fa
Diffstat (limited to 'spec/ruby/library/net')
-rw-r--r--spec/ruby/library/net/http/http/get_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/net/http/http/get_spec.rb b/spec/ruby/library/net/http/http/get_spec.rb
index 35bd51d9a3..dbdca4a431 100644
--- a/spec/ruby/library/net/http/http/get_spec.rb
+++ b/spec/ruby/library/net/http/http/get_spec.rb
@@ -60,15 +60,16 @@ describe "Net::HTTP.get" do
Thread.current.report_on_exception = false
Net::HTTP.get("127.0.0.1", '/', server.connect_address.ip_port)
end
+
+ socket = server_thread.value
Thread.pass until client_thread.stop?
- [server_thread, client_thread]
+ [socket, client_thread]
end
it "propagates exceptions interrupting the thread and does not replace it with Zlib::BufError" do
my_exception = Class.new(RuntimeError)
- server_thread, client_thread = start_threads
- socket = server_thread.value
+ socket, client_thread = start_threads
begin
client_thread.raise my_exception, "my exception"
-> { client_thread.value }.should raise_error(my_exception)
@@ -79,8 +80,7 @@ describe "Net::HTTP.get" do
ruby_version_is "2.8" do # https://bugs.ruby-lang.org/issues/13882#note-6
it "lets the kill Thread exception goes through and does not replace it with Zlib::BufError" do
- server_thread, client_thread = start_threads
- socket = server_thread.value
+ socket, client_thread = start_threads
begin
client_thread.kill
client_thread.value.should == nil