Ruby 4.0 リファレンスマニュアル

instance method Pathname#open

open(mode = 'r', perm = 0666) -> File[permalink][rdoc][edit]
open(mode = 'r', perm = 0666) {|file| ... } -> object
(?string | int mode, ?int perm) → File
[T] (?string | int mode, ?int perm) { (File) → T } → T

File.open(self.to_s, *args, &block) と同じです。

[SEE_ALSO] File.open