aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r--railties/lib/rails/commands.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb
index 8816387d34..9c5dc8f188 100644
--- a/railties/lib/rails/commands.rb
+++ b/railties/lib/rails/commands.rb
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/object/inclusion'
-
ARGV << '--help' if ARGV.empty?
aliases = {
@@ -71,7 +69,7 @@ when 'application', 'runner'
require "rails/commands/#{command}"
when 'new'
- if ARGV.first.in?(['-h', '--help'])
+ if %w(-h --help).include?(ARGV.first)
require 'rails/commands/application'
else
puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n"
@@ -84,7 +82,7 @@ when '--version', '-v'
require 'rails/commands/application'
else
- puts "Error: Command not recognized" unless command.in?(['-h', '--help'])
+ puts "Error: Command not recognized" unless %w(-h --help).include?(command)
puts <<-EOT
Usage: rails COMMAND [ARGS]