Skip to content

Commit b520acd

Browse files
committed
use PRISM_PARSER in rails/convert_constants_4_2_to_5_0
1 parent 1faa663 commit b520acd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails/convert_constants_4_2_to_5_0.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
Synvert::Rewriter.new 'rails', 'convert_constants_4_2_to_5_0' do
4-
configure(parser: Synvert::PARSER_PARSER)
4+
configure(parser: Synvert::PRISM_PARSER)
55

66
description <<~EOS
77
It converts rails constants from 4.2 to 5.0.
@@ -15,7 +15,7 @@
1515
# MissingSourceFile
1616
# =>
1717
# LoadError
18-
with_node node_type: 'const', to_source: 'MissingSourceFile' do
18+
with_node node_type: 'constant_read_node', name: 'MissingSourceFile' do
1919
replace_with 'LoadError'
2020
end
2121
end

0 commit comments

Comments
 (0)