From: "mame (Yusuke Endoh)" Date: 2012-10-27T12:00:52+09:00 Subject: [ruby-core:48437] [ruby-trunk - Feature #6671] File.split_all and File.split_root Issue #6671 has been updated by mame (Yusuke Endoh). Target version changed from 2.0.0 to next minor ---------------------------------------- Feature #6671: File.split_all and File.split_root https://bugs.ruby-lang.org/issues/6671#change-31764 Author: trans (Thomas Sawyer) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: next minor =begin Is there a method for this already? File.split_all('a/b/c') #=> ['a','b','c'] If not I propose it be added. I've had need of such more than a few times. It's too bad that File.split can't do this, as it would make more sense. And the current method be called `split_base`. In addition `split_root` would be helpful. root, path = File.split_all('a/b/c') root #=> 'a' path #=> 'b/c' =end -- http://bugs.ruby-lang.org/