Sha256: ac78edeb2b5575d5caf270939301330eac6a68f83fdf81477fce74e55c9ce303

Contents?: true

Size: 386 Bytes

Versions: 5

Compression:

Stored size: 386 Bytes

Contents

require 'xml'

def test( doc2 )
  doc = XML::Document.new('1.0')
  doc.root = XML::Node.new("ccc")
  doc.root['aaa'] = 'aaa'
  doc.root.child_add(doc2.root.copy(true)) # 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|
  print "\r#{i}"; $stdout.flush
  test2
}

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
libxml-jruby-modified-1.0.2-jruby test/ets_copy_bug.rb
libxml-jruby-modified-1.0.1-jruby test/ets_copy_bug.rb
libxml-fixed-jruby-1.0.0-jruby test/ets_copy_bug.rb
libxml-jruby-fixed-1.0.0-jruby test/ets_copy_bug.rb
libxml-jruby-1.0.0 test/ets_copy_bug.rb