diff --git a/code/capture3_with_timeout.rb b/code/capture3_with_timeout.rb index f09baf41..141e887b 100644 --- a/code/capture3_with_timeout.rb +++ b/code/capture3_with_timeout.rb @@ -14,7 +14,7 @@ def initialize(context) def run(command, max_seconds, tgz_in) result = { timed_out: false } pid = nil - waiter = OpenStruct.new(value: nil) + waiter = Struct.new(:value).new(nil) pipes = make_binary_pipes stdout_reader = threaded('stdout-reader') { pipes[:stdout].in.read } stderr_reader = threaded('stderr-reader') { pipes[:stderr].in.read } diff --git a/test/client/json_responder_test.rb b/test/client/json_responder_test.rb index 4dc95de8..45d103e2 100644 --- a/test/client/json_responder_test.rb +++ b/test/client/json_responder_test.rb @@ -92,11 +92,11 @@ def initialize(body) end def get(_path, _args) - OpenStruct.new(body: @body) + Struct.new(:body).new(@body) end def post(_path, _args) - OpenStruct.new(body: @body) + Struct.new(:body).new(@body) end end diff --git a/test/doubles/rack_request_stub.rb b/test/doubles/rack_request_stub.rb index 42d83c55..574300ba 100644 --- a/test/doubles/rack_request_stub.rb +++ b/test/doubles/rack_request_stub.rb @@ -7,7 +7,7 @@ def initialize(env) end def body - OpenStruct.new(read: @env[:body]) + Struct.new(:read).new(@env[:body]) end def path_info