[#97063] [Ruby master Bug#16608] ConditionVariable#wait should return false when timeout exceeded — shugo@...

Issue #16608 has been reported by shugo (Shugo Maeda).

10 messages 2020/02/05

[#97084] [Ruby master Feature#16614] New method cache mechanism for Guild — ko1@...

Issue #16614 has been reported by ko1 (Koichi Sasada).

18 messages 2020/02/07

[#97248] [Ruby master Bug#16651] Extensions Do Not Compile on Mingw64 — cfis@...

Issue #16651 has been reported by cfis (Charlie Savage).

17 messages 2020/02/24

[#97289] [Ruby master Bug#16658] `method__cache__clear` DTrace hook was dropped without replacement — v.ondruch@...

Issue #16658 has been reported by vo.x (Vit Ondruch).

9 messages 2020/02/27

[#97307] [Ruby master Feature#16663] Add block or filtered forms of Kernel#caller to allow early bail-out — headius@...

Issue #16663 has been reported by headius (Charles Nutter).

29 messages 2020/02/28

[#97310] [Ruby master Feature#16665] Add an Array#except_index method — alexandr1golubenko@...

Issue #16665 has been reported by alex_golubenko (Alex Golubenko).

12 messages 2020/02/29

[ruby-core:97041] [Ruby master Bug#16599] did_you_mean is not activated for NameError and KeyError

From: merch-redmine@...
Date: 2020-02-02 02:10:59 UTC
List: ruby-core #97041
Issue #16599 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

As @zverok 's analysis shows, did_you_mean does activate for NameError and KeyError if it can find suggestions.

As for not suggesting `for` for `foo` in `NameError` but doing so for `NoMethodError`, I can't tell if that is a bug in did_you_mean.  It doesn't seem to be general behavior for keywords, since did_you_mean recommends `while` for `whil` in both cases.  If you think it is a bug in did_you_mean, you may want to file it upstream: https://github.com/ruby/did_you_mean/issues

----------------------------------------
Bug #16599: did_you_mean is not activated for NameError and KeyError
https://bugs.ruby-lang.org/issues/16599#change-84134

* Author: sawa (Tsuyoshi Sawada)
* Status: Closed
* Priority: Normal
* Assignee: yuki24 (Yuki Nishijima)
* ruby -v: 2.6, 2.7, perhaps for earlier versions too
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
[This document](https://www.rubydoc.info/gems/did_you_mean/) claims that the did_you_mean gem responds to NameError, NoMethodError, and KeyError, but it actually seems to only respond to NoMethodError.

```ruby
foo()
# >> NoMethodError: undefined method `foo' for main:Object
# >> Did you mean?  for

foo
# >> NameError: undefined local variable or method `foo' for main:Object

Foo
# >> NameError: uninitialized constant Foo

{foo: 1}.fetch(:bar)
# >> KeyError: key not found: :bar
```




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next