mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
delete from :number until the end
This commit is contained in:
parent
dc76e3c38f
commit
4bfe30ca2f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue