Rails 2.3 SafeBuffer leaked evil all over my yaml

I've been googling for a while to find a solution to this, but can't seem to.

What's happening is that after upgrading from rails 2.1 to rails 2.3, my YAML started getting, for lack of a better word, 'evil' due to the introduction of the SafeBuffer class.

I thought SafeBuffer was related to ERB implementation only but it seems to have affected the output generated by .to_yaml, causing clients that want to parse this yaml to choke (not knowing anything about SafeBuffers). Grepping rails source for SafeBuffer I see nothing that could affect the yaml class...so it seems the safebuffer

This is what an evil-ized safebuffered yaml looks like (just a piece of it)


somevalue: !str   str: "yes"   "@_rails_html_safe": false

GOOD (before safebuffers)

somevalue: yes

Any ideas greatly appreciated! Yan