diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-15 12:50:55 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-15 21:09:32 -0200 |
commit | 4bfe30ca2f9ed657ddf904754cf7fabe943948a1 (patch) | |
tree | 1336d354ce44d433e4b224e2f2f41a9b5ea56aad /railties/lib | |
parent | dc76e3c38f8c58c492fa69ccaca43a9499f95588 (diff) | |
download | rails-4bfe30ca2f9ed657ddf904754cf7fabe943948a1.tar.gz rails-4bfe30ca2f9ed657ddf904754cf7fabe943948a1.tar.bz2 rails-4bfe30ca2f9ed657ddf904754cf7fabe943948a1.zip |
delete from :number until the end
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 8029a0ca77..72bfe207d7 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -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 |