Skip to content

Commit 36d611f

Browse files
Debug: log caller_locations frames in warning.rb
Temporary debug logging to compare frame layout across Ruby 3.2/3.3/3.4 + Rails 7.2/8.0 matrix in CI.
1 parent c11e1a3 commit 36d611f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/uncruft/warning.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def warn(*args, **kwargs)
88
str = args[0]
99

1010
if str =~ DEPRECATION_PATTERN # rubocop:disable Performance/RegexpMatch
11+
$stderr.puts caller_locations(0, 10).map.with_index { |cl, i| "WARNING FRAME #{i}: #{cl}" }.join("\n") # rubocop:disable Style/StderrPuts
1112
cloc = find_caller_location(str, caller_locations(1..5))
1213
message = strip_caller_info(str, cloc).strip
1314
Uncruft.deprecator.warn(message)

0 commit comments

Comments
 (0)