[ruby/prism] Remove handling OptionalNodeField in set_newline_flag
template (https://github.com/ruby/prism/pull/1905) https://github.com/ruby/prism/commit/6f7cbc1ca9
This commit is contained in:
parent
c34d23fcc8
commit
bad351a930
@ -70,7 +70,7 @@ module Prism
|
||||
def set_newline_flag(newline_marked) # :nodoc:
|
||||
<%- field = node.fields.find { |f| f.name == node.newline } or raise node.newline -%>
|
||||
<%- case field -%>
|
||||
<%- when Prism::NodeField, Prism::OptionalNodeField -%>
|
||||
<%- when Prism::NodeField -%>
|
||||
<%= field.name %>.set_newline_flag(newline_marked)
|
||||
<%- when Prism::NodeListField -%>
|
||||
first = <%= field.name %>.first
|
||||
|
Loading…
x
Reference in New Issue
Block a user