Dir.glob and File.fnmatch don't seeing eye to eye

What does File.fnmatch? not support {p,q} style selectors?

I’ve run in to a situation where on one hand I need to use a glob
against the file system and on another I need to use the same glob
against an Array of file paths. B/c of this issue I can’t find any
what to do it.

Hi, can you explain to me what is the use a glob against the file system
,
or use the same glob against an Array of file paths , for example ?

2011/7/8 Intransition [email protected]

On Jul 7, 11:29pm, coolesting [email protected] wrote:

Hi, can you explain to me what is the use a glob against the file system ,
or use the same glob against an Array of file paths , for example ?

Sure, I have configurable selection using a glob. On one hand I use
the glob to select files from current project, then for a history I
use the glob to select files from SCM (git) commits listings.

Here’s the program: http://github.com.rubyworks/locat. Code’s pretty
rough at this point but functional, I’ll spend tomorrow refactoring.

To work around the problem I just settled on using #fnmatch in both
cases (not as versatile and a bit slower, but ok)

On Fri, Jul 8, 2011 at 4:59 AM, Intransition [email protected]
wrote:

What does File.fnmatch? not support {p,q} style selectors?

I’ve run in to a situation where on one hand I need to use a glob
against the file system and on another I need to use the same glob
against an Array of file paths. B/c of this issue I can’t find any
what to do it.

I’d say: open a feature request in redmine.

Kind regards

robert