Skip to content

Commit

Permalink
[BUGFIX] Inherit children which don't respond to #namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed Jul 6, 2012
1 parent 54d5027 commit b9f2fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/niceogiri/xml/node.rb
Expand Up @@ -137,7 +137,7 @@ def inherit(node)
inherit_attrs node.attributes
node.children.each do |c|
self << (n = c.dup)
if c.namespace
if c.respond_to?(:namespace) && c.namespace
ns = n.add_namespace c.namespace.prefix, c.namespace.href
n.namespace = ns
end
Expand Down

0 comments on commit b9f2fa0

Please sign in to comment.