Bug in the YAML library: #dump fails for certain multi-line strings

J

John Trupiano

Hey guys,

I stumbled across what is a bug in the YAML library. It does not
properly encode certain multi-line strings. Fire up irb, and try the
following:
ArgumentError: syntax error on line 3, col 0: `No indent'
from /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yaml.rb:133:in
`load'
from /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/1.8/yaml.rb:133:in
`load'
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.smartlogicsolutions.com...amldump-for-multi-line-strings-stringto_yaml/

Is this the right list to discuss this?

-John
 
J

John Trupiano

Just upping this because I think it's particularly important. Is
there a better venue to discuss this? Just curious where the
interested parties (read: the ruby YAML library maintainers) are.....

-John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top