From: "Jesús Burgos Maciá" Date: 2016-07-19T12:22:08+02:00 Subject: [ruby-core:76447] Re: YAML and quoting: Is this a bug, the desired behaviour, or just a mild annoyance? --===============1531043379== Content-Type: multipart/alternative; boundary=001a1141091e0a2e920537fa7566 --001a1141091e0a2e920537fa7566 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The reason why '0034460310' gets quotes is to prevent it from being understood as an octal number. I wouldn't say it's a bug. On 19 July 2016 at 11:53, Ronald Fischer wrote: > In irb: > > require 'yaml' > YAML::dump(['0034460310','0019027200']) > > =3D> "---\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: > > --=20 Jes=C3=BAs Burgos Maci=C3=A1 --001a1141091e0a2e920537fa7566 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The reason why=C2=A0'0034460310' gets quotes is to prevent it from being understood a= s an octal number.

I wouldn't say it's a bug.

On 19 Ju= ly 2016 at 11:53, Ronald Fischer <ynnor@mm.st> wrote:
In irb:

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

=3D> "---\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=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/m= ailman/options/ruby-core>



--
Jes=C3=BAs Burgos M= aci=C3=A1
--001a1141091e0a2e920537fa7566-- --===============1531043379== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============1531043379==--