I'll be sitting in #ruby-core today if anyone's interested in
discussing this.

-John

On Sep 5, 4:16=A0pm, John Trupiano <jtrupi... / gmail.com> wrote:
> Hey guys,
>
> I stumbled across what is a bug in the YAML library. =A0It does not
> properly encode certain multi-line strings. =A0Fire up irb, and try the
> following:
>
>
>
> >> require 'yaml'
> =3D> true
> >> s3 =3D "\n =A0Do I work?\nNo indent"
>
> =3D> "\n =A0Do I work?\nNo indent"
>
> >> YAML.load(YAML.dump(s3))
>
> ArgumentError: syntax error on line 3, col 0: `No indent'
> =A0 =A0 =A0 =A0 from /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yam=
l.rb:
> 133:in `load'
> =A0 =A0 =A0 =A0 from /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yam=
l.rb:
> 133:in `load'
> =A0 =A0 =A0 =A0 from (irb):3
>
> I've confirmed it's broken in both 1.8.6.p111, and REE 1.8.6.p287.
>
> I wrote up a pretty thorough exploration of this bug in a blog post
> describing the problem and offering a (sub-optimal) patch:http://blog.sma=
rtlogicsolutions.com/2008/09/04/ruby-patch-to-fix-brok...
>
> I'll be out of town most of this weekend, but will try to check back
> in intermittently to carry on a conversation if anyone bites.
>
> -John