Commits

Kirill Simonov  committed 5a4688f

The 'N' plain scalar was still recognized as ``!!bool``. Fix it (close #26).

  • Participants
  • Parent commits 0d0a0ce

Comments (0)

Files changed (3)

File lib/yaml/resolver.py

 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:bool',
-        re.compile(ur'''^(?:yes|Yes|YES|n|N|no|No|NO
+        re.compile(ur'''^(?:yes|Yes|YES|no|No|NO
                     |true|True|TRUE|false|False|FALSE
                     |on|On|ON|off|Off|OFF)$''', re.X),
         list(u'yYnNtTfFoO'))

File tests/data/construct-bool.code

     "answer": False,
     "logical": True,
     "option": True,
+    "but": { "y": "is a string", "n": "is a string" },
 }

File tests/data/construct-bool.data

 answer: NO
 logical: True
 option: on
+
+
+but:
+    y: is a string
+    n: is a string