[前][次][番号順一覧][スレッド一覧]

ruby-changes:70734

From: Jeremy <ko1@a...>
Date: Wed, 5 Jan 2022 05:40:32 +0900 (JST)
Subject: [ruby-changes:70734] 5917f49ad0 (master): Fix documentation for Dir.glob

https://git.ruby-lang.org/ruby.git/commit/?id=5917f49ad0

From 5917f49ad03cd3b2c13d3eea85c969a113b83bf8 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Tue, 4 Jan 2022 12:38:50 -0800
Subject: Fix documentation for Dir.glob

Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the
returned array as of Ruby 3.1.

Fixes [Bug #18436]
---
 dir.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dir.rb b/dir.rb
index bf6556db96c..115f068771e 100644
--- a/dir.rb
+++ b/dir.rb
@@ -200,7 +200,7 @@ class Dir https://github.com/ruby/ruby/blob/trunk/dir.rb#L200
   #    Dir.glob("*.[^r]*")                 #=> ["config.h"]
   #    Dir.glob("*.{rb,h}")                #=> ["main.rb", "config.h"]
   #    Dir.glob("*")                       #=> ["config.h", "main.rb"]
-  #    Dir.glob("*", File::FNM_DOTMATCH)   #=> [".", "..", "config.h", "main.rb"]
+  #    Dir.glob("*", File::FNM_DOTMATCH)   #=> [".", "config.h", "main.rb"]
   #    Dir.glob(["*.rb", "*.h"])           #=> ["main.rb", "config.h"]
   #
   #    Dir.glob("**/*.rb")                 #=> ["main.rb",
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]