bin/code in code-ruby-1.0.0 vs bin/code in code-ruby-1.1.0

- old
+ new

@@ -32,17 +32,15 @@ abort Code::Version.to_s if parsed.options.version abort parsed.help if parsed.options.help input = parsed.options.input.to_s -input = File.read(input) if File.exist?(input) +input += File.read(input) if File.exist?(input) input += parsed.arguments.join(" ") input += parsed.files.map { |file| File.read(file) }.join -abort parsed.help if input.empty? - -profile = parsed.options.profile || !parsed.options.profiler.empty? +profile = parsed.options.profile || parsed.options.profiler require "ruby-prof" if profile RubyProf.start if profile if parsed.options.parse @@ -59,13 +57,13 @@ end if profile result = RubyProf.stop - if parsed.options.profiler == "html" - printer = RubyProf::GraphHtmlPrinter.new(result) - printer.print($stdout) - else - printer = RubyProf::FlatPrinter.new(result) - printer.print($stdout) - end + printer = + if parsed.options.profiler == "html" + RubyProf::GraphHtmlPrinter.new(result) + else + RubyProf::FlatPrinter.new(result) + end + printer.print($stdout) end