DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Extracting Filename (without Extension) In Ruby
Shortest, rock-solid idiom for removing the extension, without removing the preceding path: fname.chomp(File.extname(fname)) Best idiom if you are removing the path also: File.basename(fname, '.*')





