1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/test/rackup/write_to_stdout.ru
Chris LaRose 7a2cdf6a7e
Restore sync=true on global stdout/stderr streams (#2557)
* Restore sync=true on STDOUT/STDERR streams

* Move mutation of STDOUT and STDERR streams to `redirect_io`

This isn't technically related to redirecting the STDOUT and STDERR
streams, but moving it here keeps all of the STDOUT/STDERR logic
together. It seems like a more natural place to put it.

* Add a test to ensure that STDOUT is flushed by default
2021-02-22 13:17:03 -07:00

6 lines
120 B
Ruby

app = lambda do |env|
$stdout.write "hello\n"
[200, {"Content-Type" => "text/plain"}, ["Hello World"]]
end
run app