End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Pathname#realdirpath
realdirpath(p1 = v1)
ext/pathname/pathname.c
View on GitHub ↗
static VALUE
path_realdirpath(int argc, VALUE *argv, VALUE self)
{
VALUE basedir, str;
rb_scan_args(argc, argv, "01", &basedir);
str = rb_funcall(rb_cFile, id_realdirpath, 2, get_strpath(self), basedir);
return rb_class_new_instance(1, &str, rb_obj_class(self));
}
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.