Permalink
Browse files

delete from :number until the end

  • Loading branch information...
spastorino committed Oct 15, 2010
1 parent dc76e3c commit 4bfe30ca2f9ed657ddf904754cf7fabe943948a1
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 4bfe30c

Please sign in to comment.