summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Jordan <will@code.org>2021-04-26 11:47:44 -0700
committerWill Jordan <will@code.org>2021-04-26 11:48:48 -0700
commitdd23436ab5ee502d412b3aee1aa234ef6cab5d6d (patch)
tree7bbccaaa6dbe1229b68fb425cdae8e6cabf0ab12
parent2c95c7d1eb2f743f64c134bde06c92be24a70717 (diff)
downloadrack-dd23436ab5ee502d412b3aee1aa234ef6cab5d6d.tar.gz
Update SPEC to clarify streaming response body behavior
Strings must be processed individually as they are yielded by `each`. However, if the Body responds to `to_ary` it can be implicitly coerced to an Array, which may then be processed all at once.
-rw-r--r--SPEC.rdoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/SPEC.rdoc b/SPEC.rdoc
index 4cb02d74..742c9ef0 100644
--- a/SPEC.rdoc
+++ b/SPEC.rdoc
@@ -283,6 +283,10 @@ to that produced by calling +each+; this may be used by the
server as an alternative, possibly more efficient way to
transport the response.
+Strings must be processed individually as they are yielded by +each+.
+However, if the Body responds to +to_ary+ it can be implicitly coerced to
+an Array, which may then be processed all at once.
+
The Body commonly is an Array of Strings, the application
instance itself, or a File-like object.
== Thanks