summaryrefslogtreecommitdiff
path: root/lib/erb.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-26 14:17:55 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-26 14:17:55 +0000
commit43572889b3ecd8442574da98988fa187eaa04169 (patch)
treebcf45e8b053dadf9fbaaf6e1a934073a723c876e /lib/erb.rb
parent9f9f8236ff18d4e09fa404f38dbc06375347b096 (diff)
erb.rb: Tiny improvement of compiling cost
by reducing string allocation. * Before app_erb 0.687 * After app_erb 0.679 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/erb.rb')
-rw-r--r--lib/erb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index 8cb68eedb9..dcd190fcbb 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -582,7 +582,7 @@ class ERB
def content_dump(s) # :nodoc:
n = s.count("\n")
if n > 0
- s.dump + "\n" * n
+ s.dump << "\n" * n
else
s.dump
end