Project

General

Profile

Bug #5025

YAML::Syck::Map#children returns [nil, nil]

Added by trans (Thomas Sawyer) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
Backport:
[ruby-core:38055]

Description

ruby-1.9.2-p0 > d = YAML.load('--- { a: 1, b: 2 }')
=> {"a"=>1, "b"=>2}
ruby-1.9.2-p0 > d = YAML.parse('--- { a: 1, b: 2 }')
=> #Syck::Map:0x00000001890840
ruby-1.9.2-p0 > d.children
=> [nil, nil]

History

Updated by trans (Thomas Sawyer) over 8 years ago

Try that again:

d = YAML.parse('--- { a: 1, b: 2 }')
=> #<Syck::Map:0x00000001890840>
ruby-1.9.2-p0 > d.children
=> [nil, nil]

Updated by tenderlovemaking (Aaron Patterson) over 8 years ago

  • Status changed from Open to Rejected

Hi,

Please use Psych rather than syck. I don't think parse was meant to be public API in Syck, but I do consider it to be public API in Psych. The only problem is that the method exposes the parse tree for the YAML document. There isn't a way I can make the parse tree backwards compatible, and there were no tests for the parse tree in the first place.

Also available in: Atom PDF