Skip to content

reentrancy (invoking erubis from template) currupts the output of the outer invocation #9

@bughit

Description

@bughit
require 'erubis'
require 'erb'

def inner_erubis
  Erubis::Eruby.new('inner_template <%= "ruby_output" %> inner_template').result
  'ruby_output'
end


def inner_erb
  Erubis::Eruby.new('inner_template <%= "ruby_output" %> inner_template').result
  'ruby_output'
end

puts ERB.new('outer_template <%= inner_erb %> outer_template').result # outer_template ruby_output outer_template
puts Erubis::Eruby.new('outer_template <%= inner_erubis %> outer_template').result # inner_template ruby_output inner_template outer_template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions