Skip to content

Commit

Permalink
Fix params handling which broke with Sinatra 2.0.1 by removing guard …
Browse files Browse the repository at this point in the history
…clause to not initialize @params if already defined
  • Loading branch information
pdlug authored and ujifgc committed Feb 23, 2018
1 parent 02a91b8 commit 4589193
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions padrino-core/lib/padrino-core/application/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,8 @@ def filter!(type, base=settings)
end

def dispatch!
unless @params
@params = defined?(Sinatra::IndifferentHash) ? Sinatra::IndifferentHash[@request.params] : indifferent_params(@request.params)
force_encoding(@params)
end
@params = defined?(Sinatra::IndifferentHash) ? Sinatra::IndifferentHash[@request.params] : indifferent_params(@request.params)
force_encoding(@params)
invoke do
static! if settings.static? && (request.get? || request.head?)
route!
Expand Down

0 comments on commit 4589193

Please sign in to comment.