Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Fix assignments being incorrectly identified as constants. Resolves #473
Browse files Browse the repository at this point in the history
  • Loading branch information
wingrunr21 committed Aug 18, 2019
1 parent fc70d78 commit 768e8a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/language-server-ruby/src/util/RubyDocumentSymbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export default class RubyDocumentSymbol {

if (isWrapper(node)) {
if (!node.childCount) return;
// Handle foo = Foo::Bar::Baz.bam showing Foo in the outline
if (node.type === 'assignment' && node.firstChild.type === 'identifier') return;
const identifierNode = node.descendantsOfType(IDENTIFIER_NODES[node.type])[0];
if (identifierNode) {
symbol.children = [];
Expand Down

0 comments on commit 768e8a6

Please sign in to comment.