Ruby 生成的 YAML 似乎无效(!omap vs !!omap)

YAML generated by Ruby appears invalid (!omap vs !!omap)

我正在尝试解析由某些 Ruby 代码 (https://github.com/devrandom/gitian-builder/blob/81bf5d70252363a95cb75eea70f8d1d129948013/bin/gbuild#L322). I am trying to parse it using PyYAML. When PyYAML had trouble parsing the YAML, I tried an online validator (http://yaml-online-parser.appspot.com/) 生成的一些 YAML,但失败并出现以下错误:

ERROR:

could not determine a constructor for the tag '!omap'
  in "<unicode string>", line 1, column 5:
    --- !omap
        ^

我在 YAML 网站上看到(还不能 post 超过两个链接)!!omap 似乎是正确的,而不是 !omap。那么为什么在使用 YAML::Omap 时 Ruby 输出 !omap 呢?

我在网上找不到任何解释此行为的内容。

如果您想查看我正在尝试解析的 YAML 示例,请在比特币帐户下的 GitHub 上搜索 gitian.sigs 存储库,然后查看那里的任何 .assert 文件(同样,我不能 post 超过两个链接)。

原来是Syck遗留下来的东西。虽然它应该是 !!omap,但我被告知我应该能够告诉我的解析器 !omap!!omap.

相同

参见:https://github.com/tenderlove/psych/issues/241