From 93ab867636a570bb7b940e74378bcae37967d0fd Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Wed, 23 Oct 2024 01:13:06 +0100 Subject: [PATCH] Use concurrent stuff --- lib/quickdraw.rb | 1 + lib/quickdraw/context.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/quickdraw.rb b/lib/quickdraw.rb index 74847e5..5752889 100644 --- a/lib/quickdraw.rb +++ b/lib/quickdraw.rb @@ -2,6 +2,7 @@ require "concurrent/map" require "concurrent/array" +require "concurrent/set" module Quickdraw autoload :ArgumentError, "quickdraw/errors/argument_error" diff --git a/lib/quickdraw/context.rb b/lib/quickdraw/context.rb index 12835ef..d10cc2d 100644 --- a/lib/quickdraw/context.rb +++ b/lib/quickdraw/context.rb @@ -22,7 +22,7 @@ def matchers @matchers ||= if superclass < Quickdraw::Context superclass.matchers.dup else - Set[] + Concurrent::Set.new end end @@ -39,7 +39,7 @@ def initialize(name, skip, runner, matchers) @runner = runner @matchers = matchers - @expectations = [] + @expectations = Concurrent::Array.new end def expect(value = Quickdraw::Null, &block)