Programming Ruby 3.2 (5th Edition): B4.0 page 565, being managed

@noelrappin

page 565, third paragraph : strange sentence

None of these methods are dependent on the file name being managed actually existing in
the file system.

irb(main):156:0> File.basename("/aaa/bbb/ccc/code.rb")
=> "code.rb"
irb(main):157:0> File.dirname("/aaa/bbb/ccc/code.rb")
=> "/aaa/bbb/ccc"

So I understand that none of these methods are dependent on the existence of a real file.

+++++ In ref_io/filenames.rb there is twice the same line

File.dirname("/usr/pickaxe/ruby/code.rb", 2) # => "/usr/pickaxe"
File.dirname("/usr/pickaxe/ruby/code.rb", 2) # => "/usr/pickaxe"