a classic hello world example from their doc,
class HelloWorld
def call(env)
return [200, {}, [\"Hello world!\"]]
end
end
my question
I think rack originated on python's wsgi. Here is the explanation for python: http://www.python.org/dev/peps/pep-3333/#buffering-and-streaming
Judging from the sentence The Body itself should not be an instance of String, as this will break in Ruby 1.9.
, I'd assume that the last element of the response has to be an Enumerable
. Since String
s stopped including this module in 1.9, you'll need some sort of collection that implements it.
BTW: hello world examples are often not great for figuring out why something is done in a certain way, they are too trivial.