Skip to content

Commit

Permalink
Support Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Aug 7, 2023
1 parent 8e47fcf commit 1be659f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/require_relative_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu ]
ruby: [ 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', head ]
ruby: [ 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, head ]
usage: [ modern, legacy ]
steps:
- name: checkout
Expand Down
6 changes: 5 additions & 1 deletion lib/require_relative_dir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ def require_relative_dir(dir_name = SAME_AS_CALLER_NAME, except: nil, first: nil
end

refine Object do
include RequireRelativeDir
if respond_to?(:import_methods, true)
import_methods RequireRelativeDir
else
include RequireRelativeDir
end
private :require_relative_dir
end

Expand Down

0 comments on commit 1be659f

Please sign in to comment.