End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Dir.new
new(name, encoding: nil)
dir.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/dir.rb, line 34
def initialize(name, encoding: nil)
Primitive.dir_initialize(name, encoding)
end
Dir.new( string ) -> aDir Dir.new( string, encoding: enc ) -> aDir
Returns a new directory object for the named directory.
The optional encoding keyword argument specifies the encoding of the directory. If not specified, the filesystem encoding is used.