T
Thomas Leitner
Hi,
I always thought that the arguments to Dir.glob(...) and
File.fnmatch(...) are the same. However, with the first I can use
braces, with File.fnmatch not!
irb(main):001:0> Dir['*']
=> ["src", "plugin"]
irb(main):002:0> Dir.glob('s{rc}')
=> ["src"]
irb(main):003:0> File.fnmatch('s{rc}','src')
=> false
Is it somehow possible to use braces with File.fnmatch(...)?
Thomas
I always thought that the arguments to Dir.glob(...) and
File.fnmatch(...) are the same. However, with the first I can use
braces, with File.fnmatch not!
irb(main):001:0> Dir['*']
=> ["src", "plugin"]
irb(main):002:0> Dir.glob('s{rc}')
=> ["src"]
irb(main):003:0> File.fnmatch('s{rc}','src')
=> false
Is it somehow possible to use braces with File.fnmatch(...)?
Thomas