To reproduce this bug I am using the latest version of Rexle from the development environment. The code declaration is as follows:
require 'requestor'
eval Requestor.read('http://rorbuilder.info/r/ruby'){|x| x.require 'rexle'}
xpected
doc2 = Rexle.new("<a><!--<b>123</b>--><b2>456</b2></a>")
doc2.xml
#=> "<?xml version='1.0' encoding='UTF-8'?>\n<a><!--<b>123</b>--><b2>456</b2></a>"
ctual
doc2 = Rexle.new("<a><!--<b>123</b>--><b2>456</b2></a>")
doc2.xml
#=> "<?xml version='1.0' encoding='UTF-8'?>\n<a><!--<b>123<b2>456</b2></!--<b></a>"
Note: If I remove the comment it works as expected.