From 47c864a3a26eee431632681109e3028baf0f4417 Mon Sep 17 00:00:00 2001 From: cornerot Date: Mon, 7 Oct 2024 12:56:30 +0300 Subject: [PATCH] substitution.rb 0.0.3: replace `File.exists` by `File.exist` The `exists` method was removed on Ruby v3.2. --- ruby/substitution.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby/substitution.rb b/ruby/substitution.rb index b9e51a2c..dbf9ca2b 100644 --- a/ruby/substitution.rb +++ b/ruby/substitution.rb @@ -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 @@ -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 = {}