Drop one more string allocation
This commit is contained in:
parent
951348aec5
commit
87d0bde03f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue