From 669f5f489e051df1d1f8a2092d9130c5a87c2fa8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 29 Dec 2023 21:17:06 +0900 Subject: [PATCH] Add RUBYLIB to load fake etc.rb --- .github/workflows/test.yml | 3 +++ Rakefile | 1 + lib/etc.rb | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 lib/etc.rb diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ad99ac..c716ab8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,5 +23,8 @@ jobs: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.ruby < '2.7' && '3.4.22' || '' }} bundler-cache: true + - name: Add RUBYLIB to load fake etc.rb + run: + echo RUBYLIB=%CD:\=/%/lib >> $GITHUB_ENV - name: Run test run: bundle exec rake compile test diff --git a/Rakefile b/Rakefile index 18a7e4e..bead40b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,7 @@ require "bundler/gem_tasks" require "rake/testtask" require "rdoc/task" +require "etc" name = "etc" diff --git a/lib/etc.rb b/lib/etc.rb new file mode 100644 index 0000000..0310738 --- /dev/null +++ b/lib/etc.rb @@ -0,0 +1,2 @@ +$:.delete(__dir__) +raise LoadError, "etc"