
Issue #19232 has been reported by dalexj (alex jensen). ---------------------------------------- Feature #19232: add NoMatchingPatternError#matchee https://bugs.ruby-lang.org/issues/19232 * Author: dalexj (alex jensen) * Status: Open * Priority: Normal ---------------------------------------- currently if you pattern match a Hash, you can inspect the #key and #matchee methods from the NoMatchingPatternKeyError ```ruby begin { error: true } => { value: } rescue NoMatchingPatternKeyError => e e.matchee end # => {:error=>true} ``` I would find it very helpful for this functionality to be available for the standard `NoMatchingPatternError` without hash key matching proposed: ```ruby begin [:error, "message"] => [:ok, value] rescue NoMatchingPatternError => e e.matchee end # => [:error, "message"] ``` -- https://bugs.ruby-lang.org/