diff options
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 02ccdf8060..7108d4157e 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/object/inclusion' + ARGV << '--help' if ARGV.empty? aliases = { @@ -69,7 +71,7 @@ when '--version', '-v' require 'rails/commands/application' else - puts "Error: Command not recognized" unless %w(-h --help).include?(command) + puts "Error: Command not recognized" unless command.among?('-h', '--help') puts <<-EOT Usage: rails COMMAND [ARGS] |