From: Andrew Grimm Date: 2011-11-14T15:32:49+09:00 Subject: [ruby-core:41010] [ruby-trunk - Feature #5628] Module#basename Issue #5628 has been updated by Andrew Grimm. I'm not sure about the method name. What should happen with File::basename ? Should it call super when there's no arguments, and do its own thing when called with an argument? I'd prefer Ruby to tell me that I forgot to pass in a string! ---------------------------------------- Feature #5628: Module#basename http://redmine.ruby-lang.org/issues/5628 Author: Thomas Sawyer Status: Open Priority: Normal Assignee: Category: Target version: 1.9.4 Something I use fairly often: some_module.name.split("::").last It's useful for things like factory methods. It would be much nicer if we had: class Module def basename name.split("::").last end end -- http://redmine.ruby-lang.org