Project

General

Profile

Actions

Backport #1321

closed

syck does not escape a plain scalar that starts with `

Added by rbrown (Richard Brown) over 15 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
[ruby-core:23045]

Description

=begin
According to the YAML-1.0 spec ` is a reserved indicator, and plain scalars cannot start with a reserved indicator. For other indicators syck emits a double quoted scalar instead

Current Behaviour:
ruby -ryaml -e "puts '@'.to_yaml"
--- "@"
ruby -ryaml -e "puts '`'.to_yaml"
--- Intended Behaviour: ruby -ryaml -e "puts '@'.to_yaml" --- "@" ruby -ryaml -e "puts '\'.to_yaml"
--- "`"

This patch applies to trunk, the 1_8 and 1_8_7 and 1_8_6 branches
=end

Actions

Also available in: Atom PDF

Like0
Like0