Skip to content

Fix handling hash rocket after symbol #477

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 3 commits into from
Aug 22, 2017

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Aug 3, 2017

The method what creates TkIDENTIFIER, identify_identifier, it takes continuing = for method name as symbol because RDoc::RubyLex handles some symbols via TkSYMBEG and TkIDENTIFIER. But it is sometimes broken for hash literal, like below:

{ :method_name => :value } # keys is :method_name, success
{ :method_name= => :value } # key is :method_name=, success
{ :method_name=> :value } # key is :method_name, failure

This Pull Request fixes the behaviour.

aycabta added 2 commits August 3, 2017 16:39
The method what creates TkIDENTIFIER, identify_identifier,
it takes continuing `=` for method name as symbol
because `RDoc::RubyLex` handles some symbols
via TkSYMBEG and TkIDENTIFIER.
But it is sometimes broken for hash literal, like below:

{ :method_name => :value } # keys is :method_name, success
{ :method_name= => :value } # key is :method_name=, success
{ :method_name=> :value } # key is :method_name, failure

This commit fixes the behaviour.
@hsbt hsbt self-assigned this Aug 5, 2017
@hsbt
Copy link
Member

hsbt commented Aug 22, 2017

Test case seems to good.

@hsbt hsbt merged commit f1d5414 into ruby:master Aug 22, 2017
@aycabta aycabta deleted the fix-handling-hash-rocket-after-symbol branch August 22, 2017 11:00
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