Skip to content

Fix regexp literal in oneliner #497

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

Merged
merged 5 commits into from
Aug 29, 2017

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Aug 18, 2017

Regexp literal is detected by what @lex_state is :EXPR_BEG or :EXPR_MID. But when regexp literal is after method name in oneliner, @lex_state is :EXPR_END and the regexp literal becomes broken tokens.

This Pull Request fixes it.

Regexp literal is detected by what @lex_state is :EXPR_BEG or :EXPR_MID.
But when regexp literal is after method name in oneliner,
@lex_state is :EXPR_END and the regexp literal becomes broken tokens.
This commit fixes it.
@hsbt hsbt self-assigned this Aug 22, 2017
@@ -2499,22 +2499,15 @@ def blah()
assert_equal markup_code, expected
end

def test_parse_statements_postfix_if_after_heredocbeg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needless test case? It seems regression with merging master branch.

@aycabta aycabta force-pushed the fix-regexp-literal-in-oneliner branch from 5691aba to 9762de4 Compare August 23, 2017 04:46
@aycabta
Copy link
Member Author

aycabta commented Aug 23, 2017

I fixed it now, I mistook merging yesteday. More haste, less speed.

@hsbt
Copy link
Member

hsbt commented Aug 29, 2017

I heared this fix resolve ruby-regexp parsing.

@hsbt hsbt merged commit 17ae77a into ruby:master Aug 29, 2017
@aycabta aycabta deleted the fix-regexp-literal-in-oneliner branch August 29, 2017 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants