fix: as of parsby 1.1, IO can be mutated during parsing

See 534f8a95b4/lib/parsby.rb (L572C11-L572C17)

Trace:
IOError: not modifiable string
    # parsby-1.1.1/lib/parsby.rb:572:in `ungetc'
    # parsby-1.1.1/lib/parsby.rb:572:in `ungetc'
    # parsby-1.1.1/lib/parsby.rb:539:in `block in restore'
    # parsby-1.1.1/lib/parsby.rb:539:in `each'
This commit is contained in:
Colin Darie 2024-04-29 00:29:25 +02:00
parent 77fb0553fc
commit 992c61b51a
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -12,7 +12,7 @@ module TagsSubstitutionConcern
extend self
def parse(io)
doc.parse io
doc.parse(+io) # parsby mutates the StringIO during parsing!
end
def self.normalize(str)