Method: Pathname#to_s

Defined in:
pathname.c

#to_sString #to_pathString

Return the path as a String.

to_path is implemented so Pathname objects are usable with File.open, etc.

Overloads:

  • #to_sString

    Returns:

    • (String)
  • #to_pathString

    Returns:

    • (String)


174
175
176
177
178
# File 'pathname.c', line 174

static VALUE
path_to_s(VALUE self)
{
    return rb_obj_dup(get_strpath(self));
}