diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-25 23:52:40 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-25 23:52:40 +0900 |
| commit | ad17ba0e11cd3b3c6031efe9e7710a9310ff0304 (patch) | |
| tree | f46073160eed0e8d8b09b3556ae8a0986861eb14 /mrbgems/mruby-hash-ext | |
| parent | e4a9b4a3ad351695df83c0e37d9f3f04b8c08625 (diff) | |
| download | mruby-ad17ba0e11cd3b3c6031efe9e7710a9310ff0304.tar.gz mruby-ad17ba0e11cd3b3c6031efe9e7710a9310ff0304.zip | |
`KeyError` from `Hash#fetch` should inspect key.
To distinguish string keys and symbol keys.
Diffstat (limited to 'mrbgems/mruby-hash-ext')
| -rw-r--r-- | mrbgems/mruby-hash-ext/mrblib/hash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb index d1a709325..549bca0a8 100644 --- a/mrbgems/mruby-hash-ext/mrblib/hash.rb +++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb @@ -165,7 +165,7 @@ class Hash elsif none != NONE none else - raise KeyError, "Key not found: #{key}" + raise KeyError, "Key not found: #{key.inspect}" end else self[key] |
