Ruby 3.2 will introduce Exception#detailed_message and did_you_mean has been already updated in Ruby 3.2 to use that.
The new behaviour means not changing the original Exception#message. That means it is hard to get the previous error output, because Exception#detailed_message includes not only did_you_mean decorations, but also additional information like the exception class.
My fix is to change the Correctable module to essentially reimplement the old did_you_mean behavior, so that we can keep our behavior intact without getting affected by the above changes.
Ruby 3.2 will introduce
Exception#detailed_message
anddid_you_mean
has been already updated in Ruby 3.2 to use that.The new behaviour means not changing the original
Exception#message
. That means it is hard to get the previous error output, becauseException#detailed_message
includes not onlydid_you_mean
decorations, but also additional information like the exception class.My fix is to change the
Correctable
module to essentially reimplement the old did_you_mean behavior, so that we can keep our behavior intact without getting affected by the above changes.Fixes #781.