aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/benchmarker.rb
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-04-11 00:52:42 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-11 03:17:09 +0800
commita9f3c9da01d721963d05949604ead909aaabbf36 (patch)
tree5e278655997e1dcf86d9e0ee2f6be30d323fc8b4 /railties/lib/rails/commands/benchmarker.rb
parent635d991683c439da56fa72853880e88e6ac291ed (diff)
downloadrails-a9f3c9da01d721963d05949604ead909aaabbf36.tar.gz
rails-a9f3c9da01d721963d05949604ead909aaabbf36.tar.bz2
rails-a9f3c9da01d721963d05949604ead909aaabbf36.zip
Using Object#in? and Object#either? in various places
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
Diffstat (limited to 'railties/lib/rails/commands/benchmarker.rb')
-rw-r--r--railties/lib/rails/commands/benchmarker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/benchmarker.rb b/railties/lib/rails/commands/benchmarker.rb
index 0432261802..ecdcccfd8d 100644
--- a/railties/lib/rails/commands/benchmarker.rb
+++ b/railties/lib/rails/commands/benchmarker.rb
@@ -1,4 +1,6 @@
-if [nil, "-h", "--help"].include?(ARGV.first)
+require 'active_support/core_ext/object/inclusion'
+
+if ARGV.first.either?(nil, "-h", "--help")
puts "Usage: rails benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
exit 1
end