Forum: Ruby-core [ruby-trunk - Feature #7360][Open] Adding Pathname#glob

Posted by aef (Alexander E. Fischer) (Guest)
on 2012-11-15 14:27
(Received via mailing list)
Issue #7360 has been reported by aef (Alexander E. Fischer).

----------------------------------------
Feature #7360: Adding Pathname#glob
https://bugs.ruby-lang.org/issues/7360

Author: aef (Alexander E. Fischer)
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version:


Currently there is only a Pathname.glob method, which allows you to find 
Pathname objects by a pattern including wildcard characters like '*'.

I would like to be able to use this relative to a current Pathname.

some_directory = Pathname.new('some_directory')
Pathname.glob(some_directory + 'a*')   # all children starting with "a"

could then simply be:

some_directory.glob('a*')   # all children starting with "a"

If you like the idea, please let me know. I will provide a patch then.
Posted by mame (Yusuke Endoh) (Guest)
on 2012-11-24 02:53
(Received via mailing list)
Issue #7360 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to akr (Akira Tanaka)
Target version set to next minor


----------------------------------------
Feature #7360: Adding Pathname#glob
https://bugs.ruby-lang.org/issues/7360#change-33718

Author: aef (Alexander E. Fischer)
Status: Assigned
Priority: Normal
Assignee: akr (Akira Tanaka)
Category: lib
Target version: next minor


Currently there is only a Pathname.glob method, which allows you to find 
Pathname objects by a pattern including wildcard characters like '*'.

I would like to be able to use this relative to a current Pathname.

some_directory = Pathname.new('some_directory')
Pathname.glob(some_directory + 'a*')   # all children starting with "a"

could then simply be:

some_directory.glob('a*')   # all children starting with "a"

If you like the idea, please let me know. I will provide a patch then.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.