Cleanup ameba warnings (#551)

This commit is contained in:
Sijawusz Pur Rahnama 2019-08-30 13:32:23 +02:00 committed by Serdar Dogruyol
parent 740cb188a9
commit c893172fbf
5 changed files with 7 additions and 36 deletions

View file

@ -70,7 +70,7 @@ describe "Macros" do
halt env, status_code: 400, response: "Missing origin."
end
get "/" do |env|
get "/" do |_env|
"Hello world"
end

View file

@ -6,12 +6,10 @@ private def run(code)
#{code}
CR
String.build do |stdout|
stderr = String.build do |stderr|
Process.new("crystal", ["eval"], input: IO::Memory.new(code), output: stdout, error: stderr).wait
end
unless stderr.empty?
fail(stderr)
stderr = String.build do |io|
Process.new("crystal", ["eval"], input: IO::Memory.new(code), output: stdout, error: io).wait
end
fail(stderr) unless stderr.empty?
end
end