Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Dir#glob and escaped commas #1842

robin850 opened this Issue · 0 comments

1 participant



Dealing with a glob wrapped inside braces and a folder name containing commas, JRuby will ignore the escaping on commas and consider that the glob is in two parts so for instance, in the following example, JRuby will search for text files on the whole disk :

>> glob = '{i\,dont\,exist\,/**/*.txt}';

=> "jruby"
>> Dir[glob]
=> ["/install.txt", "/etc/urls.txt", ...]

=> "ruby"
>> Dir[glob]
=> []

For the record, this makes this test to fail in the Ruby on Rails test suite as searching files on the whole disk takes time and the Thread running this statement only has 5 seconds to run.

A RubySpec has been added for that in rubyspec/rubyspec#281.

Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.