Project

General

Profile

Actions

Bug #14247

closed

Thread#fetch raise KeyError without key and receiver

Added by znz (Kazuhiro NISHIYAMA) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.6.0dev (2017-12-27 trunk 61494) [x86_64-linux]
[ruby-core:84508]

Description

I found this by message without Did you mean?.

expected:

% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
        1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: "fooo" (KeyError)
Did you mean?  :foo

actual:

% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
        1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: fooo (KeyError)

Files

Thread-KeyError.diff (870 Bytes) Thread-KeyError.diff znz (Kazuhiro NISHIYAMA), 12/27/2017 12:05 PM
0001-Fix-KeyError-key-receiver-of-Thread-fetch.patch (1.22 KB) 0001-Fix-KeyError-key-receiver-of-Thread-fetch.patch znz (Kazuhiro NISHIYAMA), 12/27/2017 01:54 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0