[ruby-core:62825] [ruby-trunk - Bug #9873] [Open] YAML conversion of empty symbol

From: sawadatsuyoshi@...
Date: 2014-05-28 15:26:59 UTC
List: ruby-core #62825
Issue #9873 has been reported by Tsuyoshi Sawada.

----------------------------------------
Bug #9873: YAML conversion of empty symbol
https://bugs.ruby-lang.org/issues/9873

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.2
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The yaml gem changes the empty symbol into a string of a colon:

    require "yaml"
    :"".to_yaml # => "--- ! ':'\n"

So, the following round trip fails to maintain the original:

    YAML.load(:"".to_yaml) # => ":"




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

In This Thread

Prev Next