Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Pathname.new

new(p1)

Create a Pathname object from the given String (or String-like object). If path contains a NULL character (\0), an ArgumentError is raised.

See also .glob .pwd .getwd #+ also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1