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

ruby-changes:65675

From: Hiroshi <ko1@a...>
Date: Sun, 28 Mar 2021 14:06:08 +0900 (JST)
Subject: [ruby-changes:65675] 447e095413 (master): [ruby/pathname] Support Ruby 3.0

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

From 447e095413557330760558c2b0e1d82c3aa685f1 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Wed, 10 Feb 2021 15:53:44 +0900
Subject: [ruby/pathname] Support Ruby 3.0

Update test/pathname/test_pathname.rb

https://github.com/ruby/pathname/commit/29645187e0
https://github.com/ruby/pathname/commit/78584864de

Co-authored-by: Nobuyoshi Nakada <nobu@r...>
---
 test/pathname/test_pathname.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index b04c7eb..46a04ee 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -1288,11 +1288,12 @@ class TestPathname < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L1288
   end
 
   def test_s_glob_3args
+    expect = RUBY_VERSION >= "3.1" ? [Pathname("."), Pathname("f")] : [Pathname("."), Pathname(".."), Pathname("f")]
     with_tmpchdir('rubytest-pathname') {|dir|
       open("f", "w") {|f| f.write "abc" }
       Dir.chdir("/") {
         assert_equal(
-          [Pathname("."), Pathname("f")],
+          expect,
           Pathname.glob("*", File::FNM_DOTMATCH, base: dir).sort)
       }
     }
-- 
cgit v1.1


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

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