Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
require 'nokogiri'
xml = <<END
<foo xmlns="">
<bar xmlns:n1="">
<baz xmlns:n2="">
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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment