it 'foo' do
expect(x).to eq(
[
[ 1, 2 ],
]
)
end
it 'bar' do
end
Current that raises syntax error, unexpected 'do' (expected: 'end-of-line') because there's no call to m_call_depth.pop() when parsing the array with a trailing comma as there is in the later return.
I've reduced that example as far as I can for the tests, but it needs to have enough structure for the call depth to matter and trigger the bug. I've also added a similar test case and fix for the return statement above the while loop.
So I found some code like this:
Current that raises
syntax error, unexpected 'do' (expected: 'end-of-line')
because there's no call tom_call_depth.pop()
when parsing the array with a trailing comma as there is in the later return.I've reduced that example as far as I can for the tests, but it needs to have enough structure for the call depth to matter and trigger the bug. I've also added a similar test case and fix for the return statement above the while loop.