Skip to content

Commit

Permalink
substitution.rb 0.0.3: replace File.exists by File.exist
Browse files Browse the repository at this point in the history
The `exists` method was removed on Ruby v3.2.
  • Loading branch information
cornerot authored and flashcode committed Nov 10, 2024
1 parent d708c55 commit 47c864a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/substitution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
EOD

def weechat_init
Weechat.register('substitution', 'sam113101', '0.0.2', 'GPL3',
Weechat.register('substitution', 'sam113101', '0.0.3', 'GPL3',
'Substitute strings in your messages before they are sent.', '', '')
@config_file = Weechat.string_eval_path_home('%h/substitutions.bin', {}, {}, {'directory' => 'data'})
load_config
Expand Down Expand Up @@ -135,7 +135,7 @@ def update_config
end

def load_config
if File.exists?(@config_file)
if File.exist?(@config_file)
@substitutions = Marshal.load(File.read(@config_file))
else
@substitutions = {}
Expand Down

0 comments on commit 47c864a

Please sign in to comment.