Commit ed219e7
Use Exception#detailed_message hook for lazy loading error enhancer gems
Prepend an Exception::DetailedMessage module that loads error_highlight,
did_you_mean, and syntax_suggest on first detailed_message call, then
removes itself from the method chain to avoid double dispatch.
Guard with defined?(Ruby::DetailedError) to handle cases where the
constant may not be available in the current execution context.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 538c28b commit ed219e7
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | | - | |
48 | | - | |
| 52 | + | |
49 | 53 | | |
0 commit comments