From: nobu@... Date: 2017-12-27T12:47:23+00:00 Subject: [ruby-core:84511] [Ruby trunk Bug#14247] Thread#fetch raise KeyError without key and receiver Issue #14247 has been updated by nobu (Nobuyoshi Nakada). The given key is `:fooo` symbol, so the message should be `:fooo` but not `"fooo"`. Use `"%+"PRIsVALUE` instead of `"%"PRIsVALUE` for inspection. ---------------------------------------- Bug #14247: Thread#fetch raise KeyError without key and receiver https://bugs.ruby-lang.org/issues/14247#change-69039 * Author: znz (Kazuhiro NISHIYAMA) * Status: Assigned * Priority: Normal * Assignee: znz (Kazuhiro NISHIYAMA) * Target version: * ruby -v: ruby 2.6.0dev (2017-12-27 trunk 61494) [x86_64-linux] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- 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 `
' -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 `
' -e:1:in `fetch': key not found: fooo (KeyError) ``` ---Files-------------------------------- Thread-KeyError.diff (870 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: