Skip to content

Commit aff51e8

Browse files
authored
Replace concurrent map with a regular hash
No need for concurrent structure in a non-concurrent execution location.
1 parent 2039754 commit aff51e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

activesupport/lib/active_support/testing/time_helpers.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ class SimpleStubs # :nodoc:
1111
Stub = Struct.new(:object, :method_name, :original_method)
1212

1313
def initialize
14-
@stubs = Concurrent::Map.new do |h, k|
15-
h.compute_if_absent(k) { {} }
16-
end
14+
@stubs = Hash.new { |h, k| h[k] = {} }
1715
end
1816

1917
# Stubs object.method_name with the given block

0 commit comments

Comments
 (0)