diff options
author | Jerry D'Antonio <stumpjumper@gmail.com> | 2015-09-19 09:56:26 -0400 |
---|---|---|
committer | Jerry D'Antonio <stumpjumper@gmail.com> | 2015-09-19 09:56:26 -0400 |
commit | 56ac6e4768adb1f7055474d40a9e921380559c43 (patch) | |
tree | 01e085d38060f8739944177d6001c6996b6fc779 /activemodel | |
parent | 0c39a022b0b432afff240c5624dadee00da8d175 (diff) | |
download | rails-56ac6e4768adb1f7055474d40a9e921380559c43.tar.gz rails-56ac6e4768adb1f7055474d40a9e921380559c43.tar.bz2 rails-56ac6e4768adb1f7055474d40a9e921380559c43.zip |
Replaced `ThreadSafe::Map` with successor `Concurrent::Map`.
The thread_safe gem is being deprecated and all its code has been merged
into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly
the same as its predecessor except for fixes to two bugs discovered
during the merge.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/attribute_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 77e4ce3afe..1963a3fc4e 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -1,4 +1,4 @@ -require 'thread_safe' +require 'concurrent' require 'mutex_m' module ActiveModel @@ -350,7 +350,7 @@ module ActiveModel # significantly (in our case our test suite finishes 10% faster with # this cache). def attribute_method_matchers_cache #:nodoc: - @attribute_method_matchers_cache ||= ThreadSafe::Cache.new(initial_capacity: 4) + @attribute_method_matchers_cache ||= Concurrent::Map.new(initial_capacity: 4) end def attribute_method_matchers_matching(method_name) #:nodoc: |