From 46b2e90ddb59111c6af324d2a60c2cc826719d91 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Sat, 14 Oct 2023 14:37:28 +0200 Subject: [PATCH] Use `__dir__` instead of `File.dirname(__FILE__)` See the `Style/Dir` lint in RuboCop: https://docs.rubocop.org/rubocop/1.57/cops_style.html#styledir --- _build/build-html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_build/build-html b/_build/build-html index 6936968fa..9f73f2414 100755 --- a/_build/build-html +++ b/_build/build-html @@ -456,8 +456,7 @@ class FormatPagesGenerator end def erb(name) - bin_dir = File.expand_path(File.dirname(__FILE__)) - ERB.new(File.read("#{bin_dir}/#{name}.html.erb"), eoutvar: "_erbout_#{name}") + ERB.new(File.read(File.join(__dir__, "#{name}.html.erb")), eoutvar: "_erbout_#{name}") end end