aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/router
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2017-07-24 23:20:53 +0300
committerKir Shatrov <shatrov@me.com>2017-07-29 14:02:40 +0300
commitdfcc766163fa58389a6fe6dc5788533a455f8a89 (patch)
treec167e5e4ba9691dcbb543f2e07d716fcf11bfa4d /actionpack/lib/action_dispatch/journey/router
parent904f1a8747958129124d86b44e36c5f0263e0125 (diff)
downloadrails-dfcc766163fa58389a6fe6dc5788533a455f8a89.tar.gz
rails-dfcc766163fa58389a6fe6dc5788533a455f8a89.tar.bz2
rails-dfcc766163fa58389a6fe6dc5788533a455f8a89.zip
Use frozen string literal in actionpack/
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/router')
-rw-r--r--actionpack/lib/action_dispatch/journey/router/utils.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb
index 3336036a03..35df7f1aae 100644
--- a/actionpack/lib/action_dispatch/journey/router/utils.rb
+++ b/actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ActionDispatch
module Journey # :nodoc:
class Router # :nodoc:
@@ -13,7 +15,7 @@ module ActionDispatch
# normalize_path("") # => "/"
# normalize_path("/%ab") # => "/%AB"
def self.normalize_path(path)
- path ||= ''
+ path ||= ""
encoding = path.encoding
path = "/#{path}".dup
path.squeeze!("/".freeze)