Last active
January 23, 2020 08:36
-
-
Save mojavelinux/6ee34b77281a384a45b5bad5f165bf88 to your computer and use it in GitHub Desktop.
File.absolute_path?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class File | |
class << self | |
def absolute_path? path | |
(path.start_with? '/') || (ALT_SEPARATOR && (path.start_with? (absolute_path path).slice 0, 3)) | |
end unless method_defined? :absolute_path? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment