aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-09 18:24:49 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-09 18:28:32 -0200
commit87d0bde03f89d70f9f80d37de696e2577870170c (patch)
tree6a0fc684ea18f5bcf62f1170b03b26df3efcac0b /actionview
parent951348aec5dc5ec7443b8113ec7af4db5cde024c (diff)
downloadrails-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.rb4
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