From: Nobuyoshi Nakada <nobu@...>
Date: 2011-10-21T19:26:36+09:00
Subject: [ruby-core:40257] [Ruby 1.9 - Feature #5422] File.fnmatch != Dir.glob # {no,sets}


Issue #5422 has been updated by Nobuyoshi Nakada.


Because it comes from POSIX fnmatch() function.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html

----------------------------------------
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