mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
delete from :number until the end
This commit is contained in:
@@ -335,7 +335,7 @@ module Rails
|
||||
unless base.abstract_railtie?
|
||||
base.called_from = begin
|
||||
# Remove the line number from backtraces making sure we don't leave anything behind
|
||||
call_stack = caller.map { |p| p.split(':')[0..-2].join(':') }
|
||||
call_stack = caller.map { |p| p.sub(/:\d+.*/, '') }
|
||||
File.dirname(call_stack.detect { |p| p !~ %r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack] })
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user