Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
matrix:
ruby: [ 3.0, head ]
ruby: [ 3.0, 2.7, 2.6, head ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down
6 changes: 6 additions & 0 deletions ext/pathname/pathname.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ path_realdirpath(int argc, VALUE *argv, VALUE self)
return rb_class_new_instance(1, &str, rb_obj_class(self));
}

#ifndef RB_PASS_KEYWORDS
/* Only define macros on Ruby <2.7 */
#define rb_funcallv_kw(o, m, c, v, kw) rb_funcallv(o, m, c, v)
#define rb_block_call_kw(o, m, c, v, f, p, kw) rb_block_call(o, m, c, v, f, p)
#endif

/*
* call-seq:
* pathname.each_line {|line| ... }
Expand Down
2 changes: 1 addition & 1 deletion pathname.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.summary = %q{Representation of the name of a file or directory on the filesystem}
spec.description = %q{Representation of the name of a file or directory on the filesystem}
spec.homepage = "https://github.com/ruby/pathname"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
spec.licenses = ["Ruby", "BSD-2-Clause"]

spec.metadata["homepage_uri"] = spec.homepage
Expand Down
2 changes: 2 additions & 0 deletions test/pathname/test_pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ def test_expand_path
def test_split
assert_equal([Pathname("dirname"), Pathname("basename")], Pathname("dirname/basename").split)

omit unless RUBY_VERSION >= '2.7.0'
assert_separately([], <<-'end;')
require 'pathname'

Expand Down Expand Up @@ -1481,6 +1482,7 @@ def test_file_fnmatch
end

def test_relative_path_from_casefold
omit unless RUBY_VERSION >= '2.7.0'
assert_separately([], <<-'end;') # do
module File::Constants
remove_const :FNM_SYSCASE
Expand Down
2 changes: 1 addition & 1 deletion test/pathname/test_ractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestPathnameRactor < Test::Unit::TestCase
def setup
skip unless defined? Ractor
omit unless defined? Ractor
end

def test_ractor_shareable
Expand Down