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?