Issue #7112 has been updated by Eregon (Benoit Daloze).


Good catch!

There are a few special cases:
- dotfiles (e.g.: ".hidden") have "" for extname and ".hidden" for basename.
- files ending with a dot report "" as extname (done by rb_file_s_extname())
- looking at ruby_enc_find_extname(), the part after ':' is not kept for NTFS paths.
----------------------------------------
Bug #7112: File.extname documentation fix
https://bugs.ruby-lang.org/issues/7112#change-30122

Author: noah256 (Noah Silas)
Status: Open
Priority: Normal
Assignee: 
Category: DOC
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


The documentation says that File.extname returns the portion of the filename _after_ the period, while the actual output includes the period. Update the documentation to reflect this.


-- 
http://bugs.ruby-lang.org/