From 0196551e6039ca864d1eee1e01819fcae12c1dc9 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 29 Jul 2019 14:23:10 +0900 Subject: Use match? where we don't need MatchData --- activesupport/test/cache/stores/mem_cache_store_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/test/cache/stores/mem_cache_store_test.rb') diff --git a/activesupport/test/cache/stores/mem_cache_store_test.rb b/activesupport/test/cache/stores/mem_cache_store_test.rb index 3917d14d1c..0a5e20ed46 100644 --- a/activesupport/test/cache/stores/mem_cache_store_test.rb +++ b/activesupport/test/cache/stores/mem_cache_store_test.rb @@ -9,7 +9,7 @@ require "dalli" # connection pool testing. class SlowDalliClient < Dalli::Client def get(key, options = {}) - if key =~ /latency/ + if /latency/.match?(key) sleep 3 else super -- cgit v1.2.3