diff --git a/src/json/builder.cr b/src/json/builder.cr index 0d8d2017d1af..d848d954bc4e 100644 --- a/src/json/builder.cr +++ b/src/json/builder.cr @@ -53,6 +53,7 @@ class JSON::Builder when DocumentEndState # okay end + @io.flush end def document diff --git a/src/mime/multipart/builder.cr b/src/mime/multipart/builder.cr index 4ee45c4c6d45..202406880103 100644 --- a/src/mime/multipart/builder.cr +++ b/src/mime/multipart/builder.cr @@ -184,6 +184,7 @@ module MIME::Multipart end @state = :FINISHED + @io.flush end private def fail(msg) diff --git a/src/yaml/builder.cr b/src/yaml/builder.cr index cc925fc5a107..acc011719d58 100644 --- a/src/yaml/builder.cr +++ b/src/yaml/builder.cr @@ -72,6 +72,7 @@ class YAML::Builder # Ends a YAML stream. def end_stream emit stream_end + @io.flush end # Starts a YAML stream, invokes the block, and ends it.