Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

delete from :number until the end

  • Loading branch information...
commit 4bfe30ca2f9ed657ddf904754cf7fabe943948a1 1 parent dc76e3c
@spastorino spastorino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/engine.rb
View
2  railties/lib/rails/engine.rb
@@ -335,7 +335,7 @@ def inherited(base)
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
Please sign in to comment.
Something went wrong with that request. Please try again.