Skip to content

Instantly share code, notes, and snippets.

@mojavelinux
Last active Jan 23, 2020
Embed
What would you like to do?
File.absolute_path?
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