summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-02-10 15:53:44 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-28 14:03:42 +0900
commit447e095413557330760558c2b0e1d82c3aa685f1 (patch)
treec18f5998a1203393cdac45d5835893c2dcb15124 /test
parent38ea2306d2c3a1a698424f61dabdb42cda1a904b (diff)
[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@ruby-lang.org>
Diffstat (limited to 'test')
-rw-r--r--test/pathname/test_pathname.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index b04c7ebdae..46a04ee2b6 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -1288,11 +1288,12 @@ class TestPathname < Test::Unit::TestCase
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)
}
}