I have a hash table of twitter users.
tweeter1: @jack
tweeter2: @jill
tweeter3: @john
But because of @, I can’t YAML.load the file.
The error it throws is Psych::SyntaxError: (<unknown>): did not find expected node content while parsing a flow node at line 1 column 11
How do you use string literal for @ in YAML?
Just double quote your values:
Then you should get the expected Hash when you read it:
You can always go to yaml.org for details on the YAML format.