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