Fix a stale comment in rb_define_gem_modules

The comment still described loading via a gem_prelude.rb
Exception#detailed_message hook, which no longer exists. error.c now
loads the gems on the first error, or eagerly via Process.warmup.
This commit is contained in:
Hiroshi SHIBATA 2026-06-15 16:11:49 +09:00
parent 67dc1dfbc8
commit b9d8a39155
Notes: git 2026-07-21 02:49:43 +00:00

View File

@ -94,8 +94,8 @@ rb_define_gem_modules(VALUE flags_value, VALUE _)
if (flags->gem) {
rb_define_module("Gem");
// Make the error decoration gems autoload on first constant access.
// gem_prelude.rb loads them for error display via an
// Exception#detailed_message hook.
// error.c loads them for error display on the first error
// (or eagerly via Process.warmup).
if (flags->error_highlight) {
rb_autoload_str(rb_cObject, rb_intern("ErrorHighlight"), rb_fstring_cstr("error_highlight"));
}