Skip to content

Commit

Permalink
Make it compatible with modern Ruby
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.
  • Loading branch information
smortex committed Jan 10, 2024
1 parent f611ea7 commit e0e7d25
Showing 1 changed file with 1 addition and 1 deletion.
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 e0e7d25

Please sign in to comment.