Commit 2432b3c
Skip loading gem version of pathname on Ruby 4.0+
Ruby 4.0 makes Pathname a built-in class, and Ruby 4.1 will make all
methods including find, rmtree, and mktmpdir built-in as well. On Ruby
4.0, only the three additional methods are redefined from the gem. On
Ruby 4.1+, the gem returns immediately and defers entirely to the
built-in implementation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 46d0e45 commit 2432b3c
1 file changed
Lines changed: 4 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
18 | 14 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 15 | + | |
| 16 | + | |
26 | 17 | | |
27 | | - | |
28 | | - | |
| 18 | + | |
29 | 19 | | |
30 | 20 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 21 | | |
36 | 22 | | |
37 | 23 | | |
| |||
0 commit comments