Commit 50ccea2
Fix ERB expression compilation when code contains a heredoc
When an ERB output tag contains a heredoc (e.g. `<%= method_call <<~GRAPHQL, variables %>`),
the closing parenthesis in the compiled Ruby must appear on its own line after the heredoc
terminator. Without this, the compiled Ruby is syntactically invalid.
Amp-Thread-ID: https://ampcode.com/threads/T-019c738c-52b4-772e-ab48-9bfb6b31e8f0
Co-authored-by: Amp <amp@ampcode.com>1 parent 6ed505f commit 50ccea2
4 files changed
Lines changed: 37 additions & 2 deletions
File tree
- lib/herb
- sig/herb
- test
- engine
- snapshots/engine/engine_test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
167 | 180 | | |
168 | 181 | | |
Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments