From c80af35e142d7705a367b5b39545fbba5b1f9bc2 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Sat, 9 Dec 2023 09:23:29 +0100 Subject: [PATCH] Use non-deprecated File.exist? method File.exists? has been deprecated for some time and is no longer present in Ruby 3.2. With this change the specs pass again on Ruby 3.2. --- lib/org-ruby/output_buffer.rb | 2 +- lib/org-ruby/parser.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/org-ruby/output_buffer.rb b/lib/org-ruby/output_buffer.rb index 90a0aae..3179cd5 100644 --- a/lib/org-ruby/output_buffer.rb +++ b/lib/org-ruby/output_buffer.rb @@ -137,7 +137,7 @@ def preserve_whitespace? end def do_custom_markup - if File.exists? @options[:markup_file] + if File.exist? @options[:markup_file] load_custom_markup if @custom_blocktags.empty? no_valid_markup_found diff --git a/lib/org-ruby/parser.rb b/lib/org-ruby/parser.rb index a57fd9e..192b855 100644 --- a/lib/org-ruby/parser.rb +++ b/lib/org-ruby/parser.rb @@ -129,7 +129,7 @@ def initialize(lines, parser_options={ }) # Check include file availability and permissions def check_include_file(file_path) - can_be_included = File.exists? file_path + can_be_included = File.exist? file_path if not ENV['ORG_RUBY_INCLUDE_ROOT'].nil? # Ensure we have full paths