This doesn't work:
run Proc.new do |env|
[200,
{
"Content-Type" => "application/json; charset=UTF-8"
}, ["{\"name\":\"Rack App\"}"]]
end
But this does:
run Proc.new { |env|
[200,
{
"Content-Type" => "application/json; charset=UTF-8"
}, ["{\"name\":\"Rack App\"}"]]
}
Any ideas, why its throwing error when used with do..end?
Error I am getting:
app.ru:1:in new: tried to create Proc object without a block (ArgumentError)