Skip to content

Commit 079a065

Browse files
committed
remove unused requires in ActiveSupport::Cache
core_ext/array/wrap - added in b1164ad - usage removed in fa986ae core_ext/numeric/time - added in ee51b51, but usage was only in mem_cache_store so moved require there
1 parent 75a9e1b commit 079a065

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

activesupport/lib/active_support/cache.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
require "zlib"
44
require "active_support/core_ext/array/extract_options"
5-
require "active_support/core_ext/array/wrap"
65
require "active_support/core_ext/enumerable"
76
require "active_support/core_ext/module/attribute_accessors"
87
require "active_support/core_ext/numeric/bytes"
9-
require "active_support/core_ext/numeric/time"
108
require "active_support/core_ext/object/to_param"
119
require "active_support/core_ext/object/try"
1210
require "active_support/core_ext/string/inflections"

activesupport/lib/active_support/cache/mem_cache_store.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
require "delegate"
1111
require "active_support/core_ext/enumerable"
1212
require "active_support/core_ext/array/extract_options"
13+
require "active_support/core_ext/numeric/time"
1314

1415
module ActiveSupport
1516
module Cache

activesupport/lib/active_support/cache/redis_cache_store.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
rescue LoadError
1616
end
1717

18+
require "active_support/core_ext/numeric/time"
1819
require "active_support/digest"
1920

2021
module ActiveSupport

activesupport/test/cache/behaviors/cache_store_behavior.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require "active_support/core_ext/numeric/time"
4+
35
# Tests the base functionality that should be identical across all cache stores.
46
module CacheStoreBehavior
57
def test_should_read_and_write_strings

activesupport/test/cache/coder_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require_relative "../abstract_unit"
44
require "active_support/cache"
5+
require "active_support/core_ext/numeric/time"
56

67
class CacheCoderTest < ActiveSupport::TestCase
78
def test_new_coder_can_read_legacy_payloads

0 commit comments

Comments
 (0)