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

ruby-changes:66283

From: Nobuyoshi <ko1@a...>
Date: Fri, 21 May 2021 15:55:37 +0900 (JST)
Subject: [ruby-changes:66283] a298bdf860 (master): [ruby/rdoc] Dir.children is 2.5+

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

From a298bdf8606bda9c9868c44618c5b70a96c2712c Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 15 May 2021 01:24:15 +0900
Subject: [ruby/rdoc] Dir.children is 2.5+

RDoc seems still supporting outdated 2.4.

https://github.com/ruby/rdoc/runs/2565344070?check_suite_focus=true#step:5:64
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): NoMethodError: undefined method `children' for Dir:Class
/home/runner/work/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:467:in `block in test_remove_unparseable_CVE_2021_31799'
     464:       end
     465:
     466:       assert_equal file_list, @rdoc.remove_unparseable(file_list)
  => 467:       assert_equal file_list, Dir.children('.')
     468:     end
     469:   end
     470:
```

https://github.com/ruby/rdoc/commit/5a4a64dc0f
---
 test/rdoc/test_rdoc_rdoc.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index a83d5a1..15f5383 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -464,7 +464,7 @@ class TestRDocRDoc < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rdoc.rb#L464
       end
 
       assert_equal file_list, @rdoc.remove_unparseable(file_list)
-      assert_equal file_list, Dir.children('.')
+      assert_equal file_list, Dir.entries('.') - %w[. ..]
     end
   end
 
-- 
cgit v1.1


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

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