Skip to content
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

[Fixes #179] Have ast_with_comments distinguish nodes with same content #180

Merged
merged 1 commit into from May 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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