Sha256: da82867f5244347a4022ae298a99fe6e963e44b52e1fa81cb9a53497f1cebb8b

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

#!/usr/bin/ruby -w -I.
require "libxml_test"

def test( doc2 )
  doc = XML::Document.new('1.0')
  doc.root = XML::Node.new("ccc")
  doc.root['aaa'] = 'aaa'
  doc.root << doc2.root # BUG!
  doc.root << doc2.root.copy(true)
  return doc
end

def test2
  doc2 = XML::Document.new('1.0')
  doc2.root = XML::Node.new("aaa")
  test( doc2 )
end

1000.times { |i| puts i.to_s
                test2 }

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
libxml-ruby-0.5.0.1 tests/copy_bug.rb
libxml-ruby-0.3.8.2 tests/copy_bug.rb
libxml-ruby-0.3.8.4 tests/copy_bug.rb
libxml-ruby-0.5.0 tests/copy_bug.rb