From 19962704548f7938b74f27c2a6e0273d961d66c7 Mon Sep 17 00:00:00 2001 From: Daniel Berger <78529+djberg96@users.noreply.github.com> Date: Fri, 3 Oct 2025 09:54:16 -0400 Subject: [PATCH 1/2] Add 3.3 and 3.4, remove 2.6, stop updating rubygems. --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 217f60d..912003e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['3.2', '3.1', '3.0', '2.7', '2.6'] + ruby-version: ['3.4', '3.3', '3.2', '3.1', '3.0', '2.7'] steps: - uses: actions/checkout@v3 @@ -25,10 +25,8 @@ jobs: with: ruby-version: ${{matrix.ruby-version}} bundler-cache: true - - name: Updating RubyGems - run: gem update --system - name: Install dependencies - run: bundle install + run: bundle install --quiet - name: Rubocop run: bundle exec rubocop -D - name: Rspec From ed606e15206f8abedda0d6225aaa2a9a07bcace3 Mon Sep 17 00:00:00 2001 From: Daniel Berger <78529+djberg96@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:11:16 -0400 Subject: [PATCH 2/2] Make GLOB_FLAGS properly private, update lstat_query to lstat_query? - all to make rubocop happy. --- lib/memfs/dir.rb | 5 +++-- lib/memfs/file.rb | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/memfs/dir.rb b/lib/memfs/dir.rb index 486d813..fd9ef5a 100644 --- a/lib/memfs/dir.rb +++ b/lib/memfs/dir.rb @@ -160,13 +160,14 @@ def tell @pos end - private - GLOB_FLAGS = if defined?(File::FNM_EXTGLOB) File::FNM_EXTGLOB | File::FNM_PATHNAME else File::FNM_PATHNAME end + private_constant :GLOB_FLAGS + + private attr_accessor :entry, :max_seek, :state diff --git a/lib/memfs/file.rb b/lib/memfs/file.rb index 2b23335..ce4fb9e 100644 --- a/lib/memfs/file.rb +++ b/lib/memfs/file.rb @@ -207,7 +207,7 @@ def self.symlink(old_name, new_name) end def self.symlink?(path) - lstat_query(path, :symlink?) + lstat_query?(path, :symlink?) end def self.truncate(path, length) @@ -340,10 +340,10 @@ def self.stat_query(path, query, force_boolean: true) end private_class_method :stat_query - def self.lstat_query(path, query) + def self.lstat_query?(path, query) response = fs.find(path) && lstat(path).public_send(query) !!response end - private_class_method :lstat_query + private_class_method :lstat_query? end end