We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59c291c commit 39aa897Copy full SHA for 39aa897
lib/error_highlight/core_ext.rb
@@ -37,6 +37,11 @@ def to_s
37
end
38
39
NameError.prepend(CoreExt)
40
- TypeError.prepend(CoreExt)
41
- ArgumentError.prepend(CoreExt)
+
+ if Exception.method_defined?(:detailed_message)
42
+ # ErrorHighlight is enabled for TypeError and ArgumentError only when Exception#detailed_message is available.
43
+ # This is because changing ArgumentError#message is highly incompatible.
44
+ TypeError.prepend(CoreExt)
45
+ ArgumentError.prepend(CoreExt)
46
+ end
47
0 commit comments