Skip to content

Commit 0d9eba3

Browse files
authored
Merge pull request rails#54196 from zzak/re-52853
Really make sure AS::Deprecation::Reporting constants are private
2 parents 81cbb76 + 30ea287 commit 0d9eba3

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)