'yes' and 'no' in YAML
Picture
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!!
Written by Павел Калашников
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#