lib/node_mutation/adapter/parser.rb in node_mutation-1.19.2 vs lib/node_mutation/adapter/parser.rb in node_mutation-1.19.3

- old
+ new

@@ -175,10 +175,11 @@ node.arguments.last.loc.expression.end_pos + 1 ) end when %i[class name], %i[const name], %i[cvar name], %i[def name], %i[defs name], %i[gvar name], %i[ivar name], %i[lvar name] + NodeMutation::Struct::Range.new(node.loc.name.begin_pos, node.loc.name.end_pos) when %i[const double_colon] NodeMutation::Struct::Range.new(node.loc.double_colon.begin_pos, node.loc.double_colon.end_pos) when %i[defs dot] NodeMutation::Struct::Range.new(node.loc.operator.begin_pos, node.loc.operator.end_pos) if node.loc.operator @@ -279,10 +280,10 @@ if node.respond_to?(direct_child_name) child_node = node.send(direct_child_name) elsif direct_child_name == 'to_symbol' && node.type == :str child_node = ":#{node.to_value}" elsif direct_child_name == 'to_string' && node.type == :sym - child_node = node.to_value.to_s + child_node = node.to_value.to_s elsif direct_child_name == 'to_single_quote' && node.type == :str child_node = "'#{node.to_value}'" elsif direct_child_name == 'to_double_quote' && node.type == :str child_node = "\"#{node.to_value}\"" elsif direct_child_name == 'to_lambda_literal' && node.type == :block && node.caller.type == :send && node.caller.receiver.nil? && node.caller.message == :lambda