rake icon indicating copy to clipboard operation
rake copied to clipboard

[REGRESSION] FileList['[A-Z]*'] matches files starting with lower case character on default OS X file system using Ruby 2.2

Open donv opened this issue 9 years ago • 2 comments

The default OS X file system is case-aware, and casing used to be respected in FileList.

Including only files starting with an upper case character in gems is a very common use case which should have continued support by Rake.

  spec.files = FileList['[A-Z]*', 'bin/*', 'lib/**/*', 'test/**/*'].to_a

donv avatar Feb 28 '15 14:02 donv

Rake uses glob and has for years (see @698a54980ef0e7f84447ee67f865366f56f2857a) so I think this comes from the glob changes in Ruby 2.2 since I don't see or remember rake changes to FileList resolution.

To check, does latest rake behave the same on Ruby 2.1? This way we can determine where the regression lies.

(See the ruby 2.2 ChangeLog for the glob changes on case insensitive filesystems)

drbrain avatar Feb 28 '15 17:02 drbrain

Yes, it is the change in Ruby 2.2 that does the change in FileList. Should this behavior bleed through?

Is there a way to get the old behavior back with FileList, or do we have to resort to

  spec.files = FileList['[A-Z]*'].select{|f| f =~ /^[A-Z]/} + FileList['bin/*', 'lib/**/*', 'test/**/*'].to_a

donv avatar Mar 03 '15 09:03 donv

It seems not Rake issue.

hsbt avatar Jan 20 '23 05:01 hsbt