# File lib/rake/ext/string.rb, line 13 13: def ext(newext='') 14: return self.dup if ['.', '..'].include? self 15: if newext != '' 16: newext = (newext =~ /^\./) ? newext : ("." + newext) 17: end 18: self.chomp(File.extname(self)) << newext 19: end