Last Updated: February 25, 2016
·
1.469K
· kalashnikovisme

'yes' and 'no' in YAML

PicturePicture
If you use YAML class in Ruby to load YAML files, you should know, that yes and no in YAML is interpreted as true and false in Ruby.

For example:

yes: yes
no: no

will be interpreted as

true => true
false => false

To read no correctly as word, you should put its into quotes

'yes': 'yes'
'no': 'no'

I don't how YAML is interpreted in other languages, but in Ruby YAML.class it's so.

Good luck!!