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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ruby 3.0] Reject ->... and ->(...) using the same error #4367

Merged
merged 2 commits into from Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion third_party/parser/cc/lexer.rl
Expand Up @@ -2332,7 +2332,11 @@ void lexer::set_state_expr_value() {
if (version >= ruby_version::RUBY_27) {
emit(token_type::tBDOT3, ident, ts, te);
} else {
emit(token_type::tDOT3, ident, ts, te);
if (!lambda_stack.empty() && lambda_stack.top() == paren_nest) {
emit(token_type::tDOT3, ident, ts, te);
} else {
emit(token_type::tBDOT3, ident, ts, te);
}
}

fnext expr_beg; fbreak;
Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/import_whitequark.sh
Expand Up @@ -14,8 +14,8 @@
set -euo pipefail
set -x

REF=b69e8e595b804fd8e70ee1b90fc6dee81e183126
TARGET_RUBY_VERSION="2.7"
REF=49ed4dddfb1bf44d579fda001862149f4b9f7970
TARGET_RUBY_VERSION="3.0"

SCRIPT=$(realpath "$0")
ROOT="$(cd "$(dirname "$SCRIPT")/../.."; pwd)"
Expand Down