Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Class of alias nodes differs from class of anchor nodes in Psych

View example.yaml
1 2
:original: &id001 2012-04-14 11:00:00 Z
:alias: *id001
View example.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Ruby 1.9.2-p290
require 'yaml'
 
from_syck = YAML.load_file("example.yaml")
 
from_syck[:original].class # => Time
from_syck[:alias].class # => Time
 
require 'psych'
YAML::ENGINE.yamler = 'psych'
 
from_psych = YAML.load_file("example.yaml")
 
from_psych[:original].class # => Time
from_psych[:alias].class # => String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.