Skip Menu |
 

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 47944
Status: resolved
Priority: 0/
Queue: YAML-Syck

People
Owner: TODDR [...] cpan.org
Requestors: nek.xof [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.07
Fixed in: 1.10_01



Subject: back quote is a reserved character
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 996
Download (untitled) / with headers
text/plain 996b
Scalars with a leading back quote are not dumped in compliance with YAML 1.1 spec. Issue was found when using SnakeYAML to read YAML::Syck output. Here's how to reproduce the bug: perl -MYAML::Syck -e 'print YAML::Syck::Dump({ foo => "`bar" })' The buggy output under 1.07 is: --- foo: `bar The correct output quotes the scalar: --- foo: "`bar" This patch fixes the bug (produces the correct output above): diff -ur YAML-Syck-1.07/emitter.c YAML-Syck-1.07-fox/emitter.c --- YAML-Syck-1.07/emitter.c 2008-02-16 07:50:36.000000000 -0500 +++ YAML-Syck-1.07-fox/emitter.c 2009-07-16 10:41:05.000000000 -0400 @@ -565,7 +565,7 @@ cursor[0] == '&' || cursor[0] == '|' || cursor[0] == '>' || cursor[0] == '\'' || cursor[0] == '"' || cursor[0] == '#' || - cursor[0] == '%' || cursor[0] == '@' || + cursor[0] == '%' || cursor[0] == '@' || cursor[0] == '`' || cursor[0] == '&' || cursor[0] == '^' ) { flags |= SCAN_INDIC_S; }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6776-1274353902-391.47944-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1045
(This is a form-reply that isn't specific to your particular report) YAML::Syck has just acquired one new maintainer (me), it still doesn't have anyone that *cares* about it. But I'm willing to help solve your report & release a new version with the fix if it's easy for me. It now has a Git repository at: http://github.com/avar/YAML-Syck If your report is a patch that fixes a problem, great. Please remake the patch against Git by forking that repo and sending me a pull request on GitHub (or an update to this bug if you prefer git-format-patch(1) or some other repo provider..). Make sure to include a test for what you fixed. If your report is some code that fails (and you have a testcase for it) a patch against the test suite to demonstrate that failure would be very useful. It's OK if the test crashes and burns, see Test::More's docs for how to make TODO tests that fail now, but shouldn't. Even if it segfaults perl C<system $^X => qw/ -Mblib -MYAML::Syck .../> or something like that and checking the return value will do.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2369-1279250231-1268.47944-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 30
committed to github with tests


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.