Ruby 2.6 KeyError#initialize accepts message, receiver, and key as arguments Atul Bhosale Learn about KeyError#initialize method which accepts :message, :receiver and :key as options to set message, receiver and key on KeyError object.
Ruby 2.5 adds KeyError#receiver and KeyError#key Atul Bhosale Learn about KeyError#receiver which returns receiver associated with the KeyError object & KeyError#key returns the key which caused the exception
Ruby 2.6 added options to Exception#full_message Atul Bhosale Learn about options which Expection#full_message accepts