Skip to content

Commit

Permalink
[Fixes #179] Have ast_with_comments distinguish nodes with same con…
Browse files Browse the repository at this point in the history
…tent
  • Loading branch information
marcandre authored and mergify[bot] committed May 2, 2021
1 parent 7bcf0b4 commit 8b783c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/ast/processed_source.rb
Expand Up @@ -41,7 +41,7 @@ def initialize(source, ruby_version, path = nil)
def ast_with_comments
return if !ast || !comments

@ast_with_comments ||= Parser::Source::Comment.associate(ast, comments)
@ast_with_comments ||= Parser::Source::Comment.associate_by_identity(ast, comments)
end

# Returns the source lines, line break characters removed, excluding a
Expand Down
2 changes: 1 addition & 1 deletion rubocop-ast.gemspec
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |s|
'bug_tracker_uri' => 'https://github.com/rubocop-hq/rubocop-ast/issues'
}

s.add_runtime_dependency('parser', '>= 2.7.1.5')
s.add_runtime_dependency('parser', '>= 3.0.1.1')

s.add_development_dependency('bundler', '>= 1.15.0', '< 3.0')

Expand Down

0 comments on commit 8b783c1

Please sign in to comment.