Skip to content

Commit

Permalink
Add support for Ruby 3.2
Browse files Browse the repository at this point in the history
Ruby 2.2 deprecated `File#exists?` in favor of `File#exist?`, and Ruby
3.2 removed the deprecated method.

We need to use the "new" method to run an Ruby 3.2.
  • Loading branch information
smortex committed Jan 10, 2024
1 parent 2335fa1 commit a5ad03d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- 2.7
- 3.0
- 3.1
- 3.2
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -27,4 +28,4 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run the test suite
run: bundle exec rake test
run: bundle exec rake test
2 changes: 1 addition & 1 deletion lib/riemann/dash/browser_config/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(path)
end

def read
if ::File.exists? @path
if ::File.exist? @path
::File.open(@path, 'r') do |f|
f.flock ::File::LOCK_SH
f.read
Expand Down

0 comments on commit a5ad03d

Please sign in to comment.