From: Suraj Kurapati Date: 2012-03-16T03:27:06+09:00 Subject: [ruby-core:43312] [ruby-trunk - Feature #5422] File.fnmatch != Dir.glob # {no,sets} Issue #5422 has been updated by Suraj Kurapati. What if we pass a File::FNM_EXTGLOB flag to the File.fnmatch methods? File.fnmatch? '{.g,t}*', '.gem', File::FNM_EXTGLOB The name "extglob" comes from the Bash/Zsh option for extended globbing. ---------------------------------------- Feature #5422: File.fnmatch != Dir.glob # {no,sets} https://bugs.ruby-lang.org/issues/5422#change-24617 Author: Suraj Kurapati Status: Open Priority: Normal Assignee: Category: core Target version: 3.0 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://bugs.ruby-lang.org/