[ruby-core:76445] YAML and quoting: Is this a bug, the desired behaviour, or just a mild annoyance?

From: Ronald Fischer <ynnor@...>
Date: 2016-07-19 09:53:46 UTC
List: ruby-core #76445
In irb:

    require 'yaml'
    YAML::dump(['0034460310','0019027200'])

=> "---\n- '0034460310'\n- 0019027200\n"

Why is it that the first number ends up quoted in YAML format and the
second one is unquoted?

YAML is generous with quotes, and in this case, I get an array of two
strings back, when I do a YAML::load(....). Still, this looks a bit
conspicuous. Is it an issue I should report on the bug tracker?

Ronald

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next