In this example, in an XML document, the character \r is converted to \n.
It was instead expected to keep \r
$ gem list |grep rexml
rexml (default: 3.2.3)
$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$ irb -v
irb 1.2.1 (2019-12-24)
$ irb
irb(main):001:0> require "rexml/document"
=> true
irb(main):002:0> doc = REXML::Document.new "<a>\r</a>"
irb(main):003:0> doc.root.text
=> "\n"
irb(main):004:0>
In this example, in an XML document, the character \r is converted to \n.
It was instead expected to keep \r