Skip to content

Regression (5959b64→2d1204e4): ERB/mustache interpolation blanks String values — locals-hash string values lost in template render #1478

@OriPekelman

Description

@OriPekelman

Found re-testing tep's re-pin at master 2d1204e4. New value-correctness regression — interpolated String values come out blank in rendered templates:

test_simple_interpolation: expected /hello, world!/
                           got      "<h1>hello, !</h1>\n\n<p>Thanks .</p>\n"
test_loop_block:           expected /<li>item 0</
                           got      "<ul>\n\n</ul>\n"   # loop emits nothing

The values vanish; the surrounding literal HTML survives. Same shape in test_mustache (2 fail). This is the "Bug B" String-value-blanking class.

Construct

ERB rendered with a locals hash of Strings:

get '/hello/:who' do
  erb :hello, locals: { name: params[:who], mood: "happy" }
end
# view: <h1>hello, <%= name %>!</h1>  <p>Thanks <%= mood %>.</p>

Both name (a params[:who] String) and mood (a "happy" literal) blank. The translator lowers erb ... locals: {...} to a generated render method that pulls each local out of the hash and concatenates into the output String — so this is the locals-hash → String-value → concat path losing the values.

Regression window + suspects

Happy to bisect this commit-by-commit (I have builds across the range) and/or hand over the translated .tep.rb of the generated ERB render method. Flagging because it's a value-correctness regression (silent wrong output, not a compile error) and it blocks tep's re-pin alongside #1477 (proxy override dispatch).

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