ActionsLike0
Bug #20464
openRedundant returns are unreachable in coverage
Description
With the following code:
def meth_return(a)
return if a
return
end
If you run coverage on it, it's not possible for it to hit line 3, because there isn't a line event, because the return node was eliminated from the AST before it was compiled. There is a putnil
instruction, so it's possible for us to attach a line event for it, but the compiler doesn't today.
Updated by mame (Yusuke Endoh) about 1 year ago
- Related to Bug #20457: Final `return` is eliminated from the AST added
ActionsLike0