[ruby-core:69632] [Ruby trunk - Feature #10881] NoMethodError#receiever

From: matz@...
Date: 2015-06-17 14:04:38 UTC
List: ruby-core #69632
Issue #10881 has been updated by Yukihiro Matsumoto.


Looks OK for me. I am interested in how JRuby/Rubinius guys feel about the proposal.

Matz.


----------------------------------------
Feature #10881: NoMethodError#receiever
https://bugs.ruby-lang.org/issues/10881#change-52983

* Author: Yuki Nishijima
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
I would like `NoMethodError` to have `receiver` method:

```
receiver    = "receiver"
exception = receiver.doesnt_exist rescue $!

exception.receiver == receiver # => true
```

This helps did_you_mean gem implement its features without having native C exceptions, and also makes it easier to add "did you mean?" feature to irb. Let mw know what you think. Thanks!



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

In This Thread

Prev Next