diff options
Diffstat (limited to 'config/initializers/rack_lineprof.rb')
-rw-r--r-- | config/initializers/rack_lineprof.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/initializers/rack_lineprof.rb b/config/initializers/rack_lineprof.rb index f7172fce9bc..f2fdccd71a9 100644 --- a/config/initializers/rack_lineprof.rb +++ b/config/initializers/rack_lineprof.rb @@ -1,7 +1,7 @@ # The default colors of rack-lineprof can be very hard to look at in terminals # with darker backgrounds. This patch tweaks the colors a bit so the output is # actually readable. -if Rails.env.development? && RUBY_ENGINE == 'ruby' && ENV['ENABLE_LINEPROF'] +if Rails.env.development? && RUBY_ENGINE == "ruby" && ENV["ENABLE_LINEPROF"] Rails.application.config.middleware.use(Rack::Lineprof) module Rack @@ -9,10 +9,10 @@ if Rails.env.development? && RUBY_ENGINE == 'ruby' && ENV['ENABLE_LINEPROF'] class Sample < Rack::Lineprof::Sample.superclass def format(*) formatted = if level == CONTEXT - sprintf " | % 3i %s", line, code - else - sprintf "% 8.1fms %5i | % 3i %s", ms, calls, line, code - end + sprintf " | % 3i %s", line, code + else + sprintf "% 8.1fms %5i | % 3i %s", ms, calls, line, code + end case level when CRITICAL |