Return a pathname which the extension of the basename is substituted by repl.
If self has no extension part, repl is appended.
131 132 133 134
# File 'lib/fakefs/pathname.rb', line 131 def sub_ext(repl) ext = File.extname(@path) self.class.new(@path.chomp(ext) + repl) end