Project

General

Profile

Actions

Feature #15999

open

KeyError#inspect does not contain receiver and key

Added by znz (Kazuhiro NISHIYAMA) over 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:93748]

Description

Some exception classes accept receiver:, but #inspect does not show such information.
How about adding receiver (and key) to #inspect?

KeyError.new("message", receiver: :receiver, key: :key).inspect #=> "#<KeyError: message>"
NameError.new("message", receiver: :receiver).inspect           #=> "#<NameError: message>"
NoMethodError.new("message", receiver: :receiver).inspect       #=> "#<NoMethodError: message>"

No data to display

Actions

Also available in: Atom PDF

Like0