From cb148c5ca1c80d51a8b43967692f18264c9a7029 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sat, 5 Dec 2015 22:15:30 +0100 Subject: 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. --- railties/lib/rails/commands/command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') 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 -- cgit v1.2.3