Skip to content

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