diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-05-16 10:26:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 10:26:58 +0300 |
commit | 9c87d2316adf36cf33b1b7afe8d779bf420c52a7 (patch) | |
tree | d2fc009dce367df6d3b110df2a87eef2e836400d /railties/lib | |
parent | 3d70e9609760cb3046cf219cd49f3e9a838a0291 (diff) | |
parent | ae9be137133530913d4ee13980eabc2577de317f (diff) | |
download | rails-9c87d2316adf36cf33b1b7afe8d779bf420c52a7.tar.gz rails-9c87d2316adf36cf33b1b7afe8d779bf420c52a7.tar.bz2 rails-9c87d2316adf36cf33b1b7afe8d779bf420c52a7.zip |
Merge pull request #36286 from vishaltelangre/dummy-erb-compiler-fix
Fix: DummyCompiler embeds invalid YAML content
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/dummy_erb_compiler.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/railties/lib/rails/application/dummy_erb_compiler.rb b/railties/lib/rails/application/dummy_erb_compiler.rb index 086b9e76f4..028e790292 100644 --- a/railties/lib/rails/application/dummy_erb_compiler.rb +++ b/railties/lib/rails/application/dummy_erb_compiler.rb @@ -11,14 +11,8 @@ end class DummyCompiler < ERB::Compiler # :nodoc: def compile_content(stag, out) - case stag - when "<%=" - content = out.instance_variable_get(:@compiler).instance_variable_get(:@content) - if content.include?("?") && content.include?(":") - out.push "_erbout << 'dummy_key: dummy_value'" - else - out.push "_erbout << 'dummy_value'" - end + if stag == "<%=" + out.push "_erbout << ''" end end end |