From: "mame (Yusuke Endoh) via ruby-core" Date: 2026-06-25T06:56:01+00:00 Subject: [ruby-core:125835] [Ruby Bug#22129] error_highlight raises NotImplementedError for ArgumentErrors that get wrapped Issue #22129 has been updated by mame (Yusuke Endoh). Status changed from Assigned to Closed Merged, thank you! ---------------------------------------- Bug #22129: error_highlight raises NotImplementedError for ArgumentErrors that get wrapped https://bugs.ruby-lang.org/issues/22129#change-117756 * Author: rwstauner (Randy Stauner) * Status: Closed * Assignee: mame (Yusuke Endoh) * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED ---------------------------------------- With code like ```ruby def x(y:) = y begin x rescue => e p e.exception("wat").detailed_message end ``` a NotImplementedError is raised on ruby 4.0+ ``` /Users/rwstauner/.rubies/4.0.2/lib/ruby/4.0.0/error_highlight/base.rb:297:in 'ErrorHighlight::Spotter#spot': NotImplementedError (NotImplementedError) from /Users/rwstauner/.rubies/4.0.2/lib/ruby/4.0.0/error_highlight/base.rb:68:in 'ErrorHighlight.spot' from /Users/rwstauner/.rubies/4.0.2/lib/ruby/4.0.0/error_highlight/core_ext.rb:34:in 'ErrorHighlight::CoreExt#generate_snippet' from /Users/rwstauner/.rubies/4.0.2/lib/ruby/4.0.0/error_highlight/core_ext.rb:43:in 'ErrorHighlight::CoreExt#detailed_message' from tiny.rb:6:in 'Exception#full_message' from tiny.rb:6:in '
' tiny.rb:1:in 'Object#x': missing keyword: :y (ArgumentError) caller: tiny.rb:4 | x ^ callee: tiny.rb:1 | def x(y:) = y ^ from tiny.rb:4:in '
' ``` on ruby 3.4 it did not raise: ``` tiny.rb:1:in 'x': wat (ArgumentError) from tiny.rb:4:in '
' ``` seems related to https://bugs.ruby-lang.org/issues/21543 I have a PR up at https://github.com/ruby/error_highlight/pull/78 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/