Skip to content

Instantly share code, notes, and snippets.

@ccutrer
Created February 19, 2015 23:26
Show Gist options
  • Save ccutrer/f49cee7ebcd8a62e2e9e to your computer and use it in GitHub Desktop.
Save ccutrer/f49cee7ebcd8a62e2e9e to your computer and use it in GitHub Desktop.
Nokogiri under jruby fails to create namespaces named the same as a sibling
#!/usr/bin/env ruby
require 'nokogiri'
d = Nokogiri::XML::Document.new
e1 = d.create_element('e', 'xmlns:foo' => 'fooey')
e2 = d.create_element('e', 'xmlns:foo' => 'fooey')
puts "namespace_definitions should not be empty, but it is"
puts e2.namespace_definitions.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment