RuboCop string_content keep string interpolation

This commit is contained in:
Rylan Polster 2020-06-24 22:00:46 -04:00
parent 1f770270b4
commit cb187f6846

View File

@ -495,7 +495,15 @@ module RuboCop
when :str
node.str_content
when :dstr
node.each_child_node(:str).map(&:str_content).join
content = ""
node.each_child_node(:str, :begin) do |child|
content += if child.begin_type?
child.source
else
child.str_content
end
end
content
when :const
node.const_name
when :sym