From b0f1cd8719c2c75ebeddb376312fa4bf8c1c9c22 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Thu, 2 May 2013 04:45:47 +0500 Subject: [PATCH] use constant for encoding --- actionpack/lib/action_dispatch/http/parameters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb index 246d9c121a..20c24ddd85 100644 --- a/actionpack/lib/action_dispatch/http/parameters.rb +++ b/actionpack/lib/action_dispatch/http/parameters.rb @@ -65,7 +65,7 @@ module ActionDispatch new_hash = {} params.each do |k, v| - new_key = k.is_a?(String) ? k.dup.force_encoding("UTF-8").encode! : k + new_key = k.is_a?(String) ? k.dup.force_encoding(Encoding::UTF_8).encode! : k new_hash[new_key] = case v when Hash