Created
December 16, 2011 10:02
-
-
Save ender672/1485439 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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