nodeca/js-yaml — Issue #37: Wrong parse bug
Author: ich
Created: 2012-02-07 07:36:36+00:00
State: open

I found a [bug](http://nodeca.github.com/js-yaml/#yaml=CmJ1Z3M6CiAgeDogMSAjIG9rCiAgeTogMiAjIGJ1Z2d5LCBleHBlY3Qga2V5ICd5JwogIG46IDMgIyBidWdneSwgZXhwZWN0IGtleSAnbicKICB5ZXNWYWx1ZTogeSAjIGJ1Z2d5LCBleHBlY3Qgc3RyaW5nICd5JwogIG5vVmFsdWU6IG4gIyBidWdneSwgZXhwZWN0IHN0cmluZyAnbicKIAogIA==)

Keys or values `y` evaluate as true (yes), the same bug with `n`:

bugs:
x: 1 # ok
y: 2 # buggy, expect key 'y'
n: 3 # buggy, expect key 'n'
yesValue: y # buggy, expect string 'y'
noValue: n # buggy, expect string 'n'

->

{ bugs:
{ x: 1,
true: 2,
false: 3,
yesValue: true,
noValue: false } }