Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Drop one more string allocation

  • Loading branch information...
commit 87d0bde03f89d70f9f80d37de696e2577870170c 1 parent 951348a
@rafaelfranca rafaelfranca authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionview/lib/action_view/log_subscriber.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.