Skip to content

Commit 9a14fb1

Browse files
committed
Improve the docs of AS::BacktraceCleaner#first_clean_location
1 parent 99f918b commit 9a14fb1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

activesupport/lib/active_support/backtrace_cleaner.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def first_clean_frame(kind = :silent)
108108
if Thread.method(:each_caller_location).arity == 0
109109
# Returns the first clean location of the caller's call stack, or +nil+.
110110
#
111-
# Locations are Thread::Backtrace::Location objects.
111+
# Locations are Thread::Backtrace::Location objects. Since they are
112+
# immutable, their +path+ attributes are the original ones, but filters
113+
# are applied internally so silencers can still rely on them.
112114
def first_clean_location(kind = :silent)
113115
caller_location_skipped = false
114116

@@ -124,7 +126,9 @@ def first_clean_location(kind = :silent)
124126
else
125127
# Returns the first clean location of the caller's call stack, or +nil+.
126128
#
127-
# Locations are Thread::Backtrace::Location objects.
129+
# Locations are Thread::Backtrace::Location objects. Since they are
130+
# immutable, their +path+ attributes are the original ones, but filters
131+
# are applied internally so silencers can still rely on them.
128132
def first_clean_location(kind = :silent)
129133
Thread.each_caller_location(2) do |location|
130134
return location if clean_frame(location, kind)

0 commit comments

Comments
 (0)