Skip to content

Commit 5cb98c7

Browse files
committed
Support Ruby 3.0
1 parent 13729cb commit 5cb98c7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require "bundler/gem_tasks"
22
require "rake/testtask"
33

44
Rake::TestTask.new(:test) do |t|
5-
t.libs << "test/lib"
5+
t.libs << "lib" << "test/lib"
66
t.ruby_opts << "-rhelper"
77
t.test_files = FileList["test/**/test_*.rb"]
88
end

test/pathname/test_pathname.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,11 +1288,12 @@ def test_s_glob
12881288
end
12891289

12901290
def test_s_glob_3args
1291+
expect = RUBY_VERSION > "3.1" ? [Pathname("."), Pathname("f")] : [Pathname("."), Pathname(".."), Pathname("f")]
12911292
with_tmpchdir('rubytest-pathname') {|dir|
12921293
open("f", "w") {|f| f.write "abc" }
12931294
Dir.chdir("/") {
12941295
assert_equal(
1295-
[Pathname("."), Pathname("f")],
1296+
expect,
12961297
Pathname.glob("*", File::FNM_DOTMATCH, base: dir).sort)
12971298
}
12981299
}

0 commit comments

Comments
 (0)