• A
    Use Dir.glob in find_root_with_flag to return correct case · 7b1a6c3c
    Andrew White 提交于
    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.
    7b1a6c3c
helpers.rb 4.0 KB