Removes the last extension of path.
path
Path('script.rb').without_extension # => #<Path script> Path('archive.tar.gz').without_extension # => #<Path archive.tar>
67 68 69
# File 'lib/path/parts.rb', line 67 def without_extension Path.new @path[0..-extname.size-1] end