Permalink
Browse files

Drop one more string allocation

  • Loading branch information...
1 parent 951348a commit 87d0bde03f89d70f9f80d37de696e2577870170c @rafaelfranca rafaelfranca committed Nov 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionview/lib/action_view/log_subscriber.rb
@@ -30,7 +30,9 @@ def logger
EMPTY = ''
def from_rails_root(string)
- string.sub(rails_root, EMPTY).sub(VIEWS_PATTERN, EMPTY)
+ string = string.sub(rails_root, EMPTY)
+ string.sub!(VIEWS_PATTERN, EMPTY)
+ string
end
def rails_root

0 comments on commit 87d0bde

Please sign in to comment.