Commit 8cfe4c5
committed
Remove an example which is a syntax error in Ruby's parser
This code generates a syntax error as follows:
```ruby
❯ ruby -e '[1].each { put _1; [1].each { put _1 } }'
-e: -e:1: syntax error found (SyntaxError)
> 1 | ... _1 } }
| ^~ numbered parameter is already used in outer block
```
When numbered parameters are used in nested blocks, it is not possible to use numbered parameters in multiple different hierarchies.
While it was considered to split these up, we discussed below.
#2014 (comment)1 parent 5d768fe commit 8cfe4c5
1 file changed
+0
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 303 | | |
333 | 304 | | |
334 | 305 | | |
| |||
0 commit comments