Commit b5a768b
[ruby/prism] Fix in handling
in is a unique keyword because it can be the start of a clause or
an infix keyword. We need to be explicitly sure that even though in
_could_ close an expression context (the body of another in clause)
that we are not also parsing an inline in. The exception is the
case of a command call, which can never be the LHS of an expression,
and so we must immediately exit.
[Bug #21925]
[Bug #21674]
ruby/prism@20374ced511 parent e7d2828 commit b5a768b
2 files changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21678 | 21678 | | |
21679 | 21679 | | |
21680 | 21680 | | |
21681 | | - | |
21682 | | - | |
21683 | | - | |
21684 | | - | |
21685 | | - | |
21686 | | - | |
21687 | 21681 | | |
21688 | 21682 | | |
21689 | 21683 | | |
| |||
21796 | 21790 | | |
21797 | 21791 | | |
21798 | 21792 | | |
| 21793 | + | |
| 21794 | + | |
| 21795 | + | |
| 21796 | + | |
| 21797 | + | |
| 21798 | + | |
| 21799 | + | |
| 21800 | + | |
| 21801 | + | |
| 21802 | + | |
| 21803 | + | |
21799 | 21804 | | |
21800 | 21805 | | |
21801 | 21806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments