Skip to content

Commit 658648c

Browse files
authored
Merge pull request #57 from eregon/pure-ruby-pathname2
Define most of Pathname in Ruby (redo)
2 parents bf5a9e7 + b83d344 commit 658648c

File tree

6 files changed

+617
-1573
lines changed

6 files changed

+617
-1573
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@ jobs:
66
ruby-versions:
77
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
88
with:
9-
engine: cruby
9+
engine: all
1010

1111
test:
1212
needs: ruby-versions
1313
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
1718
os: [ ubuntu-latest, macos-latest, windows-latest ]
1819
exclude:
1920
- { os: windows-latest , ruby: head }
21+
- { os: windows-latest , ruby: truffleruby }
22+
- { os: windows-latest , ruby: truffleruby-head }
23+
# io/console warnings make CI fail
24+
- { os: macos-latest , ruby: jruby }
25+
- { os: macos-latest , ruby: jruby-head }
26+
# Errno::ESRCH: No such process - File.symlink
27+
- { os: windows-latest , ruby: jruby }
28+
- { os: windows-latest , ruby: jruby-head }
2029
include:
2130
- { os: windows-latest , ruby: mingw }
2231
- { os: windows-latest , ruby: mswin }

Rakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Rake::TestTask.new(:test) do |t|
77
t.test_files = FileList["test/**/test_*.rb"]
88
end
99

10-
require 'rake/extensiontask'
11-
Rake::ExtensionTask.new("pathname")
10+
if RUBY_ENGINE == 'ruby'
11+
require 'rake/extensiontask'
12+
Rake::ExtensionTask.new("pathname")
13+
else
14+
task :compile
15+
end
1216

1317
task :default => [:compile, :test]

ext/pathname/extconf.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# frozen_string_literal: false
2+
23
require 'mkmf'
3-
create_makefile('pathname')
4+
5+
if RUBY_ENGINE == "ruby"
6+
create_makefile('pathname')
7+
else
8+
File.write("Makefile", dummy_makefile($srcdir).join(""))
9+
end

0 commit comments

Comments
 (0)