Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0: Missing File::FNM_EXTGLOB and whatever uses it #721

Closed
enebo opened this issue May 8, 2013 · 7 comments · Fixed by #2275
Closed

2.0: Missing File::FNM_EXTGLOB and whatever uses it #721

enebo opened this issue May 8, 2013 · 7 comments · Fixed by #2275

Comments

@enebo
Copy link
Member

enebo commented May 8, 2013

2.0 defined File::FNM_EXTGLOB and it must use it somewhere. We should define this and hook up da bits.

@rkh
Copy link
Contributor

rkh commented May 8, 2013

The functionality should exist somewhere already, as this is behavior has been previously implemented in Dir.glob already, but not in File.fnmatch.

It basically means that {a,b} matches both a and b.

So File.fnmatch is using it. Interestingly, until I submitted a patch a few days back, this wasn't documented in Ruby at all and I only learned about it by actually reading the MRI source.

@rkh
Copy link
Contributor

rkh commented May 8, 2013

Seems like ruby-doc.org has already been updated with my patch: http://www.ruby-doc.org/core-2.0/File.html#method-c-fnmatch

@headius
Copy link
Member

headius commented Jun 12, 2013

This logic is indeed new, implemented by ruby_brace_expand called from fnmatch. We'll need to port it to support the new behavior.

sds pushed a commit to sds/overcommit that referenced this issue Jul 13, 2014
Apparently this doesn't exist in JRuby. See:

jruby/jruby#721

Change-Id: Idb9c80789dc98ba5b34b0b4c4e7cc132ff6a932a
Reviewed-on: http://gerrit.causes.com/40421
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
@jc00ke
Copy link
Contributor

jc00ke commented Nov 6, 2014

This is how I managed it in rubinius/rubinius@d95487c

@jc00ke
Copy link
Contributor

jc00ke commented Nov 6, 2014

Actually, I'd like to see if I can add this to JRuby too. It'd be my first commit.

@rkh
Copy link
Contributor

rkh commented Nov 6, 2014

Do it! :)

On Thu, Nov 6, 2014 at 8:31 AM, Jesse Cooke notifications@github.com
wrote:

Actually, I'd like to see if I can add this to JRuby too. It'd be my first
commit.


Reply to this email directly or view it on GitHub
#721 (comment).

@bbrowning
Copy link
Contributor

I just wanted to add a note that this prevents Rails 4.1 apps from running under JRuby 9.0.0.0, since Rails now uses File::FNM_EXTGLOB when locating template paths under 2.2.0+.

@enebo enebo added this to the JRuby 9.0.0.0-pre1 milestone Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants