summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pathname_builtin.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/pathname_builtin.rb b/pathname_builtin.rb
index 3e96d7bb35..8e856dd6a2 100644
--- a/pathname_builtin.rb
+++ b/pathname_builtin.rb
@@ -993,6 +993,13 @@ class Pathname # * File *
#
# All components of the pathname must exist when this method is called.
def realpath(...) self.class.new(File.realpath(@path, ...)) end
+
+ # Returns the real (absolute) pathname of +self+ in the actual filesystem.
+ #
+ # Does not contain symlinks or useless dots, +..+ and +.+.
+ #
+ # The last component of the real pathname can be nonexistent.
+ def realdirpath(...) self.class.new(File.realdirpath(@path, ...)) end
end