Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- ruby*.y: fixed context inside lambda args and module. #709

Commits on Jun 10, 2020

  1. - *.y: fixed context inside lambda args and module.

    Previously we didn't push a context for module and lambda arguments and so we didn't reject some code.
    However, examples that should've raised errors are complicated and it's very unlikely that any code was affected.
    
    Examples of code that is accepted/rejected differently after this change:
    1. ->(a) { module M; _1; end }
    We didn't push context for module M, and so argument `a` conflicted with implicit parameter `_1`.
    
    2. class A; ->(a = (return; 1)) {}; end
    This code is valid, because `return` is a part of the lambda. But we didn't store this fact internally, and so it was rejected before.
    
    Both examples described above (and all similar variations) are fixed in this commit.
    iliabylich committed Jun 10, 2020
    Configuration menu
    Copy the full SHA
    6773fa3 View commit details
    Browse the repository at this point in the history