Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'nokogiri'
xml = <<END
<foo xmlns="http://example.com">
<bar xmlns:n1="http://bar.com">
<baz xmlns:n2="http://baz.com">
</baz>
</bar>
</foo>
END
loop do
doc = Nokogiri.XML(xml)
list = doc.xpath('//namespace::n1')
ns = (doc%'bar').namespace # this plus previous triggers segv
# list.push(ns) # after fixing segv, fix this memleak!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment