# Risk of upgrading parts of REXML parser

**URL:** <https://www.ruby-forum.com/t/risk-of-upgrading-parts-of-rexml-parser/184602>\
**Category:** Rails\
**Created:** [March 5, 2010, 2:57am UTC](https://www.ruby-forum.com/t/risk-of-upgrading-parts-of-rexml-parser/184602 "2010-03-05T02:57:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [March 5, 2010, 2:57am UTC](https://www.ruby-forum.com/t/risk-of-upgrading-parts-of-rexml-parser/184602/1 "2010-03-05T02:57:12Z")

</div>

Hi,

In production we are running Ruby v1.8.6 patchlevel 0, whose REXML  
libraries contain a bug in the Attribute class. This particular bug  
escapes ampersands twice (e.g. “You & Me” =\> “You && Me”).  
We’ll probably upgrade to the latest patchlevel in the near future,  
but we need a quick fix, so I was thinking about monkey patching only  
the Attribute class. I ran a diff between the 2 versions and there are  
only a few line changes.  
Does anyone have experience with monkey patching only certain parts of  
the Ruby core libraries? Is this a big no-no for some reason?

Thanks,  
Tiberiu
