[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[ruby-core:83900] [Ruby trunk Feature#14132] Module#attr{|_reader|_writer} should be public
From:
ruby-core@...
Date:
2017-11-28 02:40:52 UTC
List:
ruby-core #83900
Issue #14132 has been reported by marcandre (Marc-Andre Lafortune).
----------------------------------------
Feature #14132: Module#attr{|_reader|_writer} should be public
https://bugs.ruby-lang.org/issues/14132
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
----------------------------------------
Modules and classes can be reopened and changed (unless frozen).
This is used in many meta programming techniques.
Currently, `attr_accessor`, `attr_writer` and `attr_reader` are private, so we need to either do a `class_eval`, reopen the class somehow, or resort to `:send`
As I previously stated in #6539, I feel that the use of `send` should be reserved for incorrect usage of actually private methods that might change of interface or aren't meant to be called this way (e.g. `respond_to_missing?`)
Matz has stated before that "class/module operations should be done in the scope.". Nevertheless, common usage shows that there are many cases where Rubyists prefer using a single line for this, even if it means having to call `send`.
Here are 15k+ examples of `send :attr_accessor` in the wild:
https://github.com/search?utf8=%E2%9C%93&q=language%3Aruby+%22send+%3Aattr_accessor%22&type=Code
15k+ examples of `send :attr_writer` in the wild:
https://github.com/search?utf8=%E2%9C%93&q=language%3Aruby+%22send+%3Aattr_writer%22&type=Code
15k+ examples of `send :attr_reader` in the wild:
https://github.com/search?utf8=%E2%9C%93&q=language%3Aruby+%22send+%3Aattr_reader%22&type=Code
Please make consider making `:attr`, `:attr_accessor`, `:attr_writer` and `:attr_reader` public.
--
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>