Issue #6910 has been updated by naruse (Yui NARUSE).


I want to migrate gradually.
The way needs explicit big bang conversion.
----------------------------------------
Feature #6910: Loading syck's broken yaml with psych
https://bugs.ruby-lang.org/issues/6910#change-29001

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category: ext
Target version: 2.0.0


You know, syck outputs wrong yaml.
For example, syck works as following:

ruby-1.9.2 > ["\u3042",Time.at(0).to_s].to_yaml
=> "--- \n- \"\\xE3\\x81\\x82\"\n- 1970-01-01 09:00:00 +09:00\n"

It should be

ruby-1.9.3 > ["\u3042",Time.at(0).to_s].to_yaml
=> "---\n- ???\n- '1970-01-01 09:00:00 +0900'\n"

syck's dump of Unicode string is interpreted as "\u00E3\u0081\u0082".
syck's dump of Time like string is interpreted as Time.
It is hard to migrate old data to new and correct data, so it is useful if psych has a such compatibility option.


-- 
http://bugs.ruby-lang.org/