summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-17 08:12:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-17 08:12:25 +0000
commitc9118e2a86ae03a978d499c89c8a0fdb3110fddd (patch)
treea6ede35cd42795ef14ba7225b88be44b2f5feb36 /hash.c
parentcaa14925cc059f2fb89d5af5eb1e3dda9862d171 (diff)
hash.c: key name in error message
* hash.c (env_fetch): Add key name to message on ENV.fetch KeyError, as well as Hash#fetch. [ruby-core:56062] [Feature #8649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 6cddb8cf0b..e170e67660 100644
--- a/hash.c
+++ b/hash.c
@@ -2411,7 +2411,7 @@ env_fetch(int argc, VALUE *argv)
if (!env) {
if (block_given) return rb_yield(key);
if (argc == 1) {
- rb_raise(rb_eKeyError, "key not found");
+ rb_raise(rb_eKeyError, "key not found: \"%"PRIsVALUE"\"", key);
}
return if_none;
}