diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-09 18:24:49 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-09 18:28:32 -0200 |
commit | 87d0bde03f89d70f9f80d37de696e2577870170c (patch) | |
tree | 6a0fc684ea18f5bcf62f1170b03b26df3efcac0b /actionview | |
parent | 951348aec5dc5ec7443b8113ec7af4db5cde024c (diff) | |
download | rails-87d0bde03f89d70f9f80d37de696e2577870170c.tar.gz rails-87d0bde03f89d70f9f80d37de696e2577870170c.tar.bz2 rails-87d0bde03f89d70f9f80d37de696e2577870170c.zip |
Drop one more string allocation
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/log_subscriber.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index 9336b29d0b..6c8d9cb5bf 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -30,7 +30,9 @@ module ActionView 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 |