[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
Issue #11262 has been updated by J旦rg W Mittag.
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
Issue #12103 has been updated by Martin D端rst.
3 messages
2016/02/27
[ruby-core:73649] [Ruby trunk Feature#12041]Change the initializer of NameError to take a receiver as the third argument
From:
mail@...
Date:
2016-02-02 13:39:40 UTC
List:
ruby-core #73649
Issue #12041 has been updated by Yuki Nishijima.
Speaking of `NoMethodError`, I think the former (`NoMethodError.new(msg, name [, args [,receiver]])`) makes more sense to me since the latter may break existing apps.
----------------------------------------
Feature #12041: Change the initializer of NameError to take a receiver as the third argument
https://bugs.ruby-lang.org/issues/12041#change-56840
* Author: Yuki Nishijima
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
I would like to change `NameError#initialize` to take a receiver object as the third argument. An example would be like this:
```ruby
receiver_object = Object.new
name_error = NameError.new("Error message", "name", receiver_object)
name_error.receiver.equal?(receiver_object) # => true
```
The reason I wanted this change is Rails overrides `Module#const_missing` and [raises an NameError without a receiver object](https://github.com/rails/rails/blob/23b6f65/activesupport/lib/active_support/dependencies.rb#L567-L569). It has actually affected one of the did_you_mean's spell checkers and thus no suggestions for constant names will be made on Rails. One more use case I can think of is when there's a class that inherits from `NameError` or `NoMethodError` and an arbitrary receiver needs to be passed to the initializer of the class.
Please let me know if you have any thoughts.
--
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>