From 83fabb7507604a1bce9b587d2024ff3935f24adb Mon Sep 17 00:00:00 2001 From: elias baixas Date: Fri, 24 Nov 2023 11:31:53 +0100 Subject: [PATCH] Made the code compatible with ruby 3.2 changing exists? for exist? in --- lib/stopwords/snowball/filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stopwords/snowball/filter.rb b/lib/stopwords/snowball/filter.rb index 0141ead..a974536 100644 --- a/lib/stopwords/snowball/filter.rb +++ b/lib/stopwords/snowball/filter.rb @@ -8,7 +8,7 @@ def initialize locale, custom_list = [] @locale = locale.gsub(/-\w+/, '') # remove country appendix @locale_filename = "#{File.dirname(__FILE__)}/locales/#{locale}.csv" - raise ArgumentError.new("Unknown locale: #{locale.inspect}") unless File.exists?(@locale_filename) + raise ArgumentError.new("Unknown locale: #{locale.inspect}") unless File.exist?(@locale_filename) super File.read(@locale_filename).split(",") + custom_list end end