lib/unparser/preprocessor.rb in unparser-0.1.14 vs lib/unparser/preprocessor.rb in unparser-0.1.15

- old
+ new

@@ -128,11 +128,11 @@ # # @api private # def collapsed_children chunked_children.each_with_object([]) do |(type, nodes), aggregate| - if type == :str + if type.equal?(:str) aggregate << s(:str, nodes.map { |node| node.children.first }.join) else aggregate.concat(nodes) end end @@ -161,10 +161,10 @@ # @return [Parser::AST::Node] # # @api private # def result - if children.all? { |child| child.type == :str } + if children.all? { |child| child.type.equal?(:str) } node.updated(:str, [children.map { |child| child.children.first }.join]) else node end end