Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove warning "too many arguments for format string" when interpolat…

…ing with empty hash.
  • Loading branch information...
commit 986bad6a3b89fed39c02f87068210f0c74e083cd 1 parent b9fa46c
@miloops miloops authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_dispatch/routing/mapper.rb
View
2  actionpack/lib/action_dispatch/routing/mapper.rb
@@ -350,7 +350,7 @@ def redirect(*args, &block)
options = args.last.is_a?(Hash) ? args.pop : {}
path = args.shift || block
- path_proc = path.is_a?(Proc) ? path : proc { |params| path % params }
+ path_proc = path.is_a?(Proc) ? path : proc { |params| params.empty? ? path : (path % params) }
status = options[:status] || 301
lambda do |env|
Please sign in to comment.
Something went wrong with that request. Please try again.