Project

General

Profile

Actions

Feature #8649

closed

Make ENV.fetch KeyError give key name in error message.

Added by mmb (Matthew Boedicker) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:56062]

Description

The KeyError raised by ENV.fetch('test') when the 'test' key does not exist does not give the name of the key in the error message.

This patch makes it give a better error message and behave like Hash.fetch.


Files

env_fetch_keyerror.patch (1.39 KB) env_fetch_keyerror.patch mmb (Matthew Boedicker), 07/17/2013 02:10 PM
Actions

Also available in: Atom PDF

Like0
Like0