instance method
Pathname#split
() -> [ ::Pathname, ::Pathname ]
split
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/pathname_builtin.rb, line 985
def split()
array = File.split(@path)
raise TypeError, 'wrong argument type nil (expected Array)' unless Array === array
array.map {|f| self.class.new(f) }
end
See File.split. Returns the dirname and the basename in an Array.