Skip to content

Commit

Permalink
use Sinatra2 IndifferentHash if available, fixes #2132
Browse files Browse the repository at this point in the history
  • Loading branch information
ujifgc committed May 8, 2017
1 parent 2adbd75 commit a3ea63b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rdoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
= CHANGES

== 0.14.0.2 (2017-05-08)
- FIX #2132 use Sinatra2 IndifferentHash if available

== 0.14.0.1 (2017-03-23)
- FIX #2118 allow Logger without Extensions
- FIX #2128 do not render default layout in partials
Expand Down
2 changes: 1 addition & 1 deletion padrino-core/lib/padrino-core/application/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ def filter!(type, base=settings)

def dispatch!
unless @params
@params = indifferent_params(@request.params)
@params = defined?(Sinatra::IndifferentHash) ? Sinatra::IndifferentHash[@request.params] : indifferent_params(@request.params)
force_encoding(@params)
end
invoke do
Expand Down

2 comments on commit a3ea63b

@wikimatze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test for this issue?

@ujifgc
Copy link
Member Author

@ujifgc ujifgc commented on a3ea63b May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an integration issue. Travis would have caught it if we committed more often.

Please sign in to comment.