]> git.openstreetmap.org Git - rails.git/blob - config/initializers/router.rb
Add frozen_string_literal comments to ruby files
[rails.git] / config / initializers / router.rb
1 # frozen_string_literal: true
2
3 # Some versions of ruby seem to accidentally force the encoding
4 # as part of normalize_path and some don't
5
6 module OpenStreetMap
7   module Router
8     module ForceEncoding
9       def normalize_path(path)
10         super.force_encoding("UTF-8")
11       end
12     end
13   end
14 end
15
16 ActionDispatch::Journey::Router::Utils.singleton_class.prepend(OpenStreetMap::Router::ForceEncoding)