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:
commit
073d90c67d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user