Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: aaron [...] sysdev.oucs.ox.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.30
Fixed in: (no value)



Subject: Problem with strings ending in ':' and ' '
YAML:Syck doesn't seem to correctly encode strings that end with either a ':' or a ' ' e.g Dump('a:') will give --- a: which is wrong as it should be --- 'a:' Similarly there is a problem with strings ending in space. As a fix, either use the syck_scan_scalar from emitter.c in the Syck CVS or apply the following patch: --- emitter.c (revision 7113) +++ emitter.c (revision 7249) @@ -575,6 +575,14 @@ flags |= SCAN_MANYNL_E; } + /* ending colons */ + /* These are the wrong flag codes, but have the correct affect */ + if ( cursor[len-1] == ':' ) { + flags |= SCAN_INDIC_S; + } else if ( cursor[len-1] == ' ' ) { + flags |= SCAN_INDIC_S; + } + /* opening doc sep */ if ( len >= 3 && strncmp( cursor, "---", 3 ) == 0 ) flags |= SCAN_DOCSEP; This is on Debain, running v5.8.4 and YAML:Syck 0.30
Subject: Re: [rt.cpan.org #17574] Problem with strings ending in ':' and ' '
Date: Sat, 11 Feb 2006 17:04:19 +0800
To: bug-YAML-Syck [...] rt.cpan.org
From: Audrey Tang <autrijus [...] gmail.com>
On 2/11/06, Guest via RT <bug-YAML-Syck@rt.cpan.org> wrote: Show quoted text
> Fri Feb 10 12:24:40 2006: Request 17574 was acted upon. > Transaction: Ticket created by guest > Queue: YAML-Syck > Subject: Problem with strings ending in ':' and ' ' > Owner: Nobody > Requestors: aaron@sysdev.oucs.ox.ac.uk > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17574 > > > > YAML:Syck doesn't seem to correctly encode strings that end with either > a ':' or a ' '
0.31 fixes it, but I'll look at chasing CVS later.