diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-11 16:24:04 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-11 16:25:19 +0900 |
commit | efb935a5daf04cf3309453351f87faea4a3a2e6e (patch) | |
tree | d2712d623a35aa881f947a3bb47851e0442e5128 | |
parent | f5ec52d4afec986a8f068ac16be6a5dbb4638e76 (diff) | |
download | rails-efb935a5daf04cf3309453351f87faea4a3a2e6e.tar.gz rails-efb935a5daf04cf3309453351f87faea4a3a2e6e.tar.bz2 rails-efb935a5daf04cf3309453351f87faea4a3a2e6e.zip |
Use already defined Encoding constant rather than freezing a String
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 5c71f0fc48..5d10129d21 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -33,7 +33,7 @@ module ActionDispatch paths = [path, "#{path}#{ext}", "#{path}/#{@index}#{ext}"] if match = paths.detect { |p| - path = File.join(@root, p.force_encoding("UTF-8".freeze)) + path = File.join(@root, p.force_encoding(Encoding::UTF_8)) begin File.file?(path) && File.readable?(path) rescue SystemCallError |