diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2014-11-13 23:59:45 +0100 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2014-11-16 20:20:14 +0200 |
commit | ff1902789d45190dd298b65342699d6043dd8ef2 (patch) | |
tree | ee242101813310b0a11dc7d3d63a088d9da97aeb /actionpack/lib | |
parent | 759054abfc66ba0ddc2073a83c3a4c2cdd467e9d (diff) | |
download | rails-ff1902789d45190dd298b65342699d6043dd8ef2.tar.gz rails-ff1902789d45190dd298b65342699d6043dd8ef2.tar.bz2 rails-ff1902789d45190dd298b65342699d6043dd8ef2.zip |
Don't double check trace origin in ExceptionWrapper#traces
If a trace isn't an application one, then it comes from a framework.
That's the definition of framework trace. We can speed up the traces
generation if we don't double check that.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/exception_wrapper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb index b8381aba70..edd98c5cf2 100644 --- a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +++ b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb @@ -65,8 +65,12 @@ module ActionDispatch full_trace.each_with_index do |trace, idx| trace_with_id = { id: idx, trace: trace } - appplication_trace_with_ids << trace_with_id if application_trace.include?(trace) - framework_trace_with_ids << trace_with_id if framework_trace.include?(trace) + if application_trace.include?(trace) + appplication_trace_with_ids << trace_with_id + else + framework_trace_with_ids << trace_with_id + end + full_trace_with_ids << trace_with_id end |