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