summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-01-02 10:07:14 -0500
committerPeter Zhu <[email protected]>2024-01-02 12:03:31 -0500
commitb959263b58e26ef630c085f9f7ddc04373a998c7 (patch)
tree2192d5e52d4e3abc94682169dfb3804545d1f46f /error.c
parent28ec79404a9b37d245daf76250563cf36b295eb0 (diff)
Fix Exception#detailed_message for GC compaction
Before this commit, the test fails with RGENGC_CHECK_MODE enabled: TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]: <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1mbar\e[m\n" + "\e[1mbaz\e[m"> expected but was <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m">.
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 29f0f27ab9..f972ac807b 100644
--- a/error.c
+++ b/error.c
@@ -1662,7 +1662,7 @@ exc_detailed_message(int argc, VALUE *argv, VALUE exc)
VALUE highlight = check_highlight_keyword(opt, 0);
- extern VALUE rb_decorate_message(const VALUE eclass, const VALUE emesg, int highlight);
+ extern VALUE rb_decorate_message(const VALUE eclass, VALUE emesg, int highlight);
return rb_decorate_message(CLASS_OF(exc), rb_get_message(exc), RTEST(highlight));
}