Skip to content

Commit

Permalink
Use Parser::Source::TreeRewriter instead of Parser::Source::Rewriter
Browse files Browse the repository at this point in the history
Parser::Source::Rewriter is deprecated.
  • Loading branch information
yujinakayama committed Sep 15, 2018
1 parent 12c3308 commit c3fa89c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/gemologist/abstract_gemfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ def ast
end

def source_rewriter
@source_rewriter ||= Parser::Source::Rewriter.new(source_buffer)
@source_rewriter ||= Parser::Source::TreeRewriter.new(
source_buffer,
crossing_deletions: :accept,
different_replacements: :raise,
swallowed_insertions: :raise
)
end

def source_buffer
Expand Down

0 comments on commit c3fa89c

Please sign in to comment.