This works as expected, it records the 2 in the else block.
def a
rescue
else 123 # => 123
end # => :a
a # => 123
However, if we remove the rescue, it does not record the else.
def a
else 123
end # => :a
a # => 123
Looks like Parser omits it from the AST, I opened an issue here.
My initial diagnosis was this, which may still be relevant at some point in the future: Probably an issue with SeeingIsBelieving::WrapExpressions, the test should go here, or somewhere close by. To fix it, probably follow the recursive invocations through this case statement, and figure out where it abandons the else clause.
If this gets fixed, remove this comment from the Readme.
This works as expected, it records the
2
in the else block.However, if we remove the
rescue
, it does not record theelse
.Looks like Parser omits it from the AST, I opened an issue here.
My initial diagnosis was this, which may still be relevant at some point in the future: Probably an issue with
SeeingIsBelieving::WrapExpressions
, the test should go here, or somewhere close by. To fix it, probably follow the recursive invocations through this case statement, and figure out where it abandons the else clause.If this gets fixed, remove this comment from the Readme.