Skip to content

Commit 40cb797

Browse files
committed
Prefer require_relative for internal requires
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - ruby/psych#522 - ruby/logger#20 - ruby/rdoc#658 - panorama-ed#349 - rubocop/rubocop#8748
1 parent ac1231e commit 40cb797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/memo_wise.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require "set" # Ruby < 3.2 does not load `set` by default.
44

5-
require "memo_wise/internal_api"
6-
require "memo_wise/version"
5+
require_relative "memo_wise/internal_api"
6+
require_relative "memo_wise/version"
77

88
# MemoWise is the wise choice for memoization in Ruby.
99
#

0 commit comments

Comments
 (0)