diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-07-12 19:48:31 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-07-12 19:48:31 +0900 |
commit | 03925dc26a747075ff37660d1f0a060a8178bf66 (patch) | |
tree | 8f7cdc99966bed299c6ad1de4377c620d5461a85 /actionpack/lib | |
parent | e319b01de8d42e1c8dd511d882b988121c81604f (diff) | |
download | rails-03925dc26a747075ff37660d1f0a060a8178bf66.tar.gz rails-03925dc26a747075ff37660d1f0a060a8178bf66.tar.bz2 rails-03925dc26a747075ff37660d1f0a060a8178bf66.zip |
normalize_path used to be nil tolerant
fixes a regression introduced at 8607c25ba7810573733d9b37d0015154ba059f5e
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/utils.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb index 1ac86d10d6..3336036a03 100644 --- a/actionpack/lib/action_dispatch/journey/router/utils.rb +++ b/actionpack/lib/action_dispatch/journey/router/utils.rb @@ -13,6 +13,7 @@ module ActionDispatch # normalize_path("") # => "/" # normalize_path("/%ab") # => "/%AB" def self.normalize_path(path) + path ||= '' encoding = path.encoding path = "/#{path}".dup path.squeeze!("/".freeze) |