Skip to content

0.2.5 breaks scalars with block notation #196

@tenderlove

Description

@tenderlove

Hi,

Version 0.2.5 seems to break scalars that use block notation but with custom tags. For example:

---
hmm: !example.com,2002/type |
  hello

The above document would parse on 0.2.4, but 0.2.5 raises an exception:

did not find expected whitespace or line break while scanning a tag at line 2 column 6

Strangely, the following two documents both work on 0.2.4 as well as 0.2.5:

---
hmm: |
  hello
---
hmm: !binary |
  hello

I bisected and found that this was introduced in #179. Before #179, all three of the above documents would successfully parse.

I can't tell if this is intentional, so I'm not 100% sure how to fix tests. The tests in Psych are failing with 0.2.5 but not 0.2.4. Some of the failures are obvious problems in Psych's test suite, but this one isn't so obvious.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions