Use Dir.glob in find_root_with_flag to return correct case
As of Ruby 2.2, Dir.glob returns matches with the correct case as opposed to in previous versions where the matches were returned with the case of the pattern. In certain scenarios on Mac OS X the app can be booted with the incorrect case, e.g. incorrect case on Pow symlink). This is because the app is built by Rack::Builder evaluating a string from the config.ru file and passing the incorrectly cased path to the eval method. As Dir.glob is the only method in Ruby 2.2 that appears to do this case correction currently we need to rewrite the find_root_with_flag method to use it so that it corrects the case for when the applications paths instance is created. Fixes #18660.
Showing
想要评论请 注册 或 登录