From 42a5ee18767c4b87b4eb3d64bc1523afe43381b2 Mon Sep 17 00:00:00 2001 From: Jens Kraemer Date: Sat, 18 Jul 2015 13:25:42 +0200 Subject: [PATCH] add test case checking decoration of empty NodeSet, which fails on JRuby --- test/xml/test_document_fragment.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/xml/test_document_fragment.rb b/test/xml/test_document_fragment.rb index 138542e5430..5d8ea5ac73d 100644 --- a/test/xml/test_document_fragment.rb +++ b/test/xml/test_document_fragment.rb @@ -219,6 +219,16 @@ def awesome! assert fragment.children.respond_to?(:awesome!), fragment.children.class end + def test_decorator_is_applied_to_empty_set + x = Module.new do + def awesome! + end + end + util_decorate(@xml, x) + fragment = Nokogiri::XML::DocumentFragment.new(@xml, "") + assert fragment.children.respond_to?(:awesome!), fragment.children.class + end + def test_add_node_to_doc_fragment_segfault frag = Nokogiri::XML::DocumentFragment.new(@xml, '

hello world

') Nokogiri::XML::Comment.new(frag,'moo')