From 8bafd0460db564296bd196ccf61202638ea169a2 Mon Sep 17 00:00:00 2001 From: ysk Date: Wed, 10 Apr 2024 18:41:48 +0900 Subject: [PATCH] fix: Support for ruby3.2 Dir.exists? was removed in Ruby 3.2.(https://docs.ruby-lang.org/ja/3.0/method/Dir/s/exists=3f.html) Changed to use Dir.exist? Related Issues https://github.com/SciRuby/nmatrix/issues/636 --- ext/nmatrix/extconf.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/nmatrix/extconf.rb b/ext/nmatrix/extconf.rb index f321c382..50de27f2 100644 --- a/ext/nmatrix/extconf.rb +++ b/ext/nmatrix/extconf.rb @@ -54,13 +54,13 @@ create_conf_h("nmatrix_config.h") create_makefile("nmatrix") -Dir.mkdir("data") unless Dir.exists?("data") -Dir.mkdir("util") unless Dir.exists?("util") -Dir.mkdir("storage") unless Dir.exists?("storage") +Dir.mkdir("data") unless Dir.exist?("data") +Dir.mkdir("util") unless Dir.exist?("util") +Dir.mkdir("storage") unless Dir.exist?("storage") Dir.chdir("storage") do - Dir.mkdir("yale") unless Dir.exists?("yale") - Dir.mkdir("list") unless Dir.exists?("list") - Dir.mkdir("dense") unless Dir.exists?("dense") + Dir.mkdir("yale") unless Dir.exist?("yale") + Dir.mkdir("list") unless Dir.exist?("list") + Dir.mkdir("dense") unless Dir.exist?("dense") end # to clean up object files in subdirectories: