aboutsummaryrefslogtreecommitdiffstats
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
commit5812093770ed934b14e9b0fc2753278b25ee5473 (patch)
treebcf45e8b053dadf9fbaaf6e1a934073a723c876e /lib/erb.rb
parent537fc85917f0986c10584d41f8c9a5488e5784e2 (diff)
downloadruby-5812093770ed934b14e9b0fc2753278b25ee5473.tar.gz
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