File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
activesupport/lib/active_support Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -92,20 +92,7 @@ def first_clean_frame(kind = :silent)
92
92
return frame if frame
93
93
end
94
94
end
95
- else
96
- # Returns the first clean frame of the caller's backtrace, or +nil+.
97
- #
98
- # Frames are strings.
99
- def first_clean_frame ( kind = :silent )
100
- Thread . each_caller_location ( 2 ) do |location |
101
- frame = clean_frame ( location , kind )
102
- return frame if frame
103
- end
104
- end
105
- end
106
95
107
- # Thread.each_caller_location does not accept a start in Ruby < 3.4.
108
- if Thread . method ( :each_caller_location ) . arity == 0
109
96
# Returns the first clean location of the caller's call stack, or +nil+.
110
97
#
111
98
# Locations are Thread::Backtrace::Location objects. Since they are
@@ -124,6 +111,16 @@ def first_clean_location(kind = :silent)
124
111
end
125
112
end
126
113
else
114
+ # Returns the first clean frame of the caller's backtrace, or +nil+.
115
+ #
116
+ # Frames are strings.
117
+ def first_clean_frame ( kind = :silent )
118
+ Thread . each_caller_location ( 2 ) do |location |
119
+ frame = clean_frame ( location , kind )
120
+ return frame if frame
121
+ end
122
+ end
123
+
127
124
# Returns the first clean location of the caller's call stack, or +nil+.
128
125
#
129
126
# Locations are Thread::Backtrace::Location objects. Since they are
You can’t perform that action at this time.
0 commit comments