Merge pull request #47735 from nirebu/nirebu/stop-root-string-allocation-in-helper

Do not allocate the first character when checking for relative paths
This commit is contained in:
Jean Boussier 2023-04-26 12:08:01 +02:00 committed by GitHub
commit 073d90c67d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,7 +68,7 @@ def inspect
private
def relative_path?(path)
path && !path.empty? && path[0] != "/"
path && !path.empty? && !path.start_with?("/")
end
def escape(params)