aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-12-05 22:15:30 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2015-12-05 22:17:24 +0100
commitcb148c5ca1c80d51a8b43967692f18264c9a7029 (patch)
treee00c7c90f4eee5d37eccc5c0f6af57f969a2dd10 /railties
parentedc3deb9f1035811dfa6b4fedfaa18a0654c7018 (diff)
downloadrails-cb148c5ca1c80d51a8b43967692f18264c9a7029.tar.gz
rails-cb148c5ca1c80d51a8b43967692f18264c9a7029.tar.bz2
rails-cb148c5ca1c80d51a8b43967692f18264c9a7029.zip
Replace `-> {}` with a proc.
When `parse_options_for` was called for a command that hadn't set up any option parsing with `options_for`, the `call` method would be sent to `-> {}`, which didn't like to be passed two arguments. Switch to `proc {}` which can accept several arguments.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/commands/command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/command.rb b/railties/lib/rails/commands/command.rb
index 16e1fadcd3..c8707be3ab 100644
--- a/railties/lib/rails/commands/command.rb
+++ b/railties/lib/rails/commands/command.rb
@@ -41,7 +41,7 @@ module Rails
@@command_options = {}
def parse_options_for(command_name)
- @@command_options.fetch(command_name, -> {}).call(@option_parser, @options)
+ @@command_options.fetch(command_name, proc {}).call(@option_parser, @options)
end
def build_option_parser