Commit b3d0ae4
Lazy load error_highlight, did_you_mean, and syntax_suggest
Replace eager require with autoload + a one-shot Exception#detailed_message
hook. At boot, gem_prelude.rb replaces the empty marker modules (from
rb_define_module in ruby.c) with autoload entries. Direct constant access
triggers autoload transparently; error display uses the hook.
During gem loading, Kernel#require is temporarily restored to the
original (pre-monkeypatch) version so that nested requires inside the
gems are not intercepted by user monkeypatching.
[Feature #21951]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 41978d8 commit b3d0ae4
1 file changed
Lines changed: 40 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments