lib/rails/commands/performance/profiler.rb in railties-3.0.0.beta vs lib/rails/commands/performance/profiler.rb in railties-3.0.0.beta2
- old
+ new
@@ -1,6 +1,6 @@
-if ARGV.empty?
- $stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]"
+if [nil, "-h", "--help"].include?(ARGV.first)
+ $stderr.puts "Usage: rails profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]"
exit(1)
end
# Define a method to profile.
if ARGV[1] and ARGV[1].to_i > 1