diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-20 06:36:57 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-20 06:36:57 +0000 |
commit | 7241c3b81fe573dcaed71e08c1fd44c069095040 (patch) | |
tree | a285bd7b3433600fc89f0a17d8b9d4e2b709613b /lib/erb.rb | |
parent | b9623dbdb805998cb975adacb62df362ac567014 (diff) | |
download | ruby-7241c3b81fe573dcaed71e08c1fd44c069095040.tar.gz |
* lib/erb.rb: revert r53123. It break compatibility like thor and rspec-rails.
We should try with Ruby 2.4 or 3.0.
[Bug #11842][ruby-core:72374]
* lib/rdoc/erb_partial.rb: ditto.
* template/verconf.h.tmpl: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/erb.rb')
-rw-r--r-- | lib/erb.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/erb.rb b/lib/erb.rb index b876ca4625..73fc574314 100644 --- a/lib/erb.rb +++ b/lib/erb.rb @@ -590,7 +590,7 @@ class ERB end def add_insert_cmd(out, content) - out.push("#{@insert_cmd}((#{content}))") + out.push("#{@insert_cmd}((#{content}).to_s)") end # Compiles an ERB template into Ruby code. Returns an array of the code @@ -835,10 +835,10 @@ class ERB # requires the setup of an ERB _compiler_ object. # def set_eoutvar(compiler, eoutvar = '_erbout') - compiler.put_cmd = "#{eoutvar}.push" - compiler.insert_cmd = "#{eoutvar}.push" - compiler.pre_cmd = ["#{eoutvar} = []"] - compiler.post_cmd = ["#{eoutvar}.join.force_encoding(__ENCODING__)"] + compiler.put_cmd = "#{eoutvar}.concat" + compiler.insert_cmd = "#{eoutvar}.concat" + compiler.pre_cmd = ["#{eoutvar} = ''"] + compiler.post_cmd = ["#{eoutvar}.force_encoding(__ENCODING__)"] end # Generate results and print them. (see ERB#result) |