diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-17 08:12:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-17 08:12:25 +0000 |
commit | c9118e2a86ae03a978d499c89c8a0fdb3110fddd (patch) | |
tree | a6ede35cd42795ef14ba7225b88be44b2f5feb36 /hash.c | |
parent | caa14925cc059f2fb89d5af5eb1e3dda9862d171 (diff) | |
download | ruby-c9118e2a86ae03a978d499c89c8a0fdb3110fddd.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |