mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use already defined Encoding constant rather than freezing a String
This commit is contained in:
parent
f5ec52d4af
commit
efb935a5da
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ module ActionDispatch
|
||||||
paths = [path, "#{path}#{ext}", "#{path}/#{@index}#{ext}"]
|
paths = [path, "#{path}#{ext}", "#{path}/#{@index}#{ext}"]
|
||||||
|
|
||||||
if match = paths.detect { |p|
|
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
|
begin
|
||||||
File.file?(path) && File.readable?(path)
|
File.file?(path) && File.readable?(path)
|
||||||
rescue SystemCallError
|
rescue SystemCallError
|
||||||
|
|
Loading…
Reference in a new issue