Skip to content

Commit 30ea287

Browse files
committed
Really make sure AS::Deprecation::Reporting constants are private
1 parent 6f65662 commit 30ea287

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

activesupport/lib/active_support/deprecation/reporting.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ def extract_callstack(callstack)
149149
[offending_line.path, offending_line.lineno, offending_line.label]
150150
end
151151

152-
RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/" # :nodoc:
153-
LIB_DIR = RbConfig::CONFIG["libdir"] # :nodoc:
152+
RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/"
153+
private_constant :RAILS_GEM_ROOT
154+
LIB_DIR = RbConfig::CONFIG["libdir"]
155+
private_constant :LIB_DIR
154156

155157
def ignored_callstack?(path)
156158
path.start_with?(RAILS_GEM_ROOT, LIB_DIR) || path.include?("<internal:")

0 commit comments

Comments
 (0)