Skip to content

Commit 0112405

Browse files
committed
refactor: prefer require over autoload for const referenced in the same file
1 parent 20fdab0 commit 0112405

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/rack/attack.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require 'rack'
44
require 'forwardable'
5+
require 'rack/attack/cache'
6+
require 'rack/attack/configuration'
57
require 'rack/attack/path_normalizer'
68
require 'rack/attack/request'
79
require "ipaddr"
@@ -14,8 +16,6 @@ class Error < StandardError; end
1416
class MisconfiguredStoreError < Error; end
1517
class MissingStoreError < Error; end
1618

17-
autoload :Configuration, 'rack/attack/configuration'
18-
autoload :Cache, 'rack/attack/cache'
1919
autoload :Check, 'rack/attack/check'
2020
autoload :Throttle, 'rack/attack/throttle'
2121
autoload :Safelist, 'rack/attack/safelist'

0 commit comments

Comments
 (0)