1 2 3 4 5 6 7
P.S. Even if the YAML you are parsing is very simple,
YAML silently runs into problems with escaped whitespace (“foo\ bar”), erroneously leaving the backslashes in the output.
Psych handles this just fine.
YAML will use Psych instead of Syck as its engine if you have
require 'psych' before
require 'yaml' – thanks to Benoit Daloze for pointing this out. If this implicit behavior is causing pains for you, especially with Rails or Bundler, I recommend you read Matthew Kocher’s post about YAML, Psych, and Syck (and the discussion in the comments there).
Read more at the source