提交 ff83df36 编写于 作者: A Andrey Vakarev

Refactoring: turn unless/else into if/else

上级 ae8b09c3
......@@ -166,15 +166,7 @@ def run_all!(times, verbose)
Runner.run(:diff_100, times, verbose)
end
unless ENV["PROFILE"]
run_all!(1, false)
(ENV["M"] || 1).to_i.times do
$ran = []
run_all!(N, true)
Runner.done
end
else
if ENV["PROFILE"]
Runner.run(ENV["PROFILE"].to_sym, 1, false)
require "ruby-prof"
RubyProf.start
......@@ -182,4 +174,12 @@ def run_all!(times, verbose)
result = RubyProf.stop
printer = RubyProf::CallStackPrinter.new(result)
printer.print(File.open("output.html", "w"))
else
run_all!(1, false)
(ENV["M"] || 1).to_i.times do
$ran = []
run_all!(N, true)
Runner.done
end
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册