lib/niceogiri/xml/node.rb in niceogiri-1.0.0 vs lib/niceogiri/xml/node.rb in niceogiri-1.0.1

- old
+ new

@@ -132,14 +132,10 @@ # @param [XML::Node] node the node to inherit # @return [self] def inherit(node) set_namespace node.namespace if node.namespace inherit_attrs node.attributes - node.children.each do |c| - self << (n = c.dup) - ns = n.namespace_definitions.find { |ns| ns.prefix == c.namespace.prefix } - n.namespace = ns if ns - end + node.children.each { |c| self << c.dup } self end # Inherit a set of attributes #