We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
caller_locations
1 parent b43a3bb commit 226f932Copy full SHA for 226f932
lib/marginalia/comment.rb
@@ -112,10 +112,12 @@ def self.sidekiq_job
112
def self.line
113
Marginalia::Comment.lines_to_ignore ||= DEFAULT_LINES_TO_IGNORE_REGEX
114
115
- last_line = caller.detect do |line|
116
- line !~ Marginalia::Comment.lines_to_ignore
+ last_line = caller_locations.detect do |loc|
+ !loc.path.match?(Marginalia::Comment.lines_to_ignore)
117
end
118
if last_line
119
+ last_line = last_line.to_s
120
+
121
root = if defined?(Rails) && Rails.respond_to?(:root)
122
Rails.root.to_s
123
elsif defined?(RAILS_ROOT)
0 commit comments