From: Thomas Sawyer Date: 2011-10-22T13:47:35+09:00 Subject: [ruby-core:40274] [Ruby 1.9 - Feature #5422] File.fnmatch != Dir.glob # {no,sets} Issue #5422 has been updated by Thomas Sawyer. > "The former doesn't sound appropriate, because "glob" does not imply brace expansion originally." I'm only going by the functionality of `Dir.glob`. But, whatever name seems best. > "Brace expansion is a string to array conversion operation, and not used only for file names in shell scripts." Okay, I mistook your example's use of `*` and similarity of name to `File.expand_path` to think that it was. `File.expand_brace` is fine if you think it would be useful in and of itself. But the real need is for a Dir.glob compatible match method. ---------------------------------------- Feature #5422: File.fnmatch != Dir.glob # {no,sets} http://redmine.ruby-lang.org/issues/5422 Author: Suraj Kurapati Status: Open Priority: Normal Assignee: Category: core Target version: 2.0 ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] Hello, The File.fnmatch methods do not support Dir.glob's set notation: >> Dir.glob '{.g,t}*' => [".gem", "test"] >> File.fnmatch? '{.g,t}*', 'test' => false >> File.fnmatch? '{.g,t}*', '.gem' => false Please add set notation to fnmatch() and make it equal to glob(). Thanks for your consideration. -- http://redmine.ruby-lang.org