Skip to content

Instantly share code, notes, and snippets.

@ender672
Created December 16, 2011 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ender672/1485439 to your computer and use it in GitHub Desktop.
Save ender672/1485439 to your computer and use it in GitHub Desktop.
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