[#103241] [Ruby master Bug#17777] 2.6.7 fails to build on macOS: implicit declaration of function 'rb_native_mutex_destroy' is invalid in C99 — eregontp@...
Issue #17777 has been reported by Eregon (Benoit Daloze).
17 messages
2021/04/05
[#103305] [Ruby master Feature#17785] Allow named parameters to be keywords — marcandre-ruby-core@...
Issue #17785 has been reported by marcandre (Marc-Andre Lafortune).
21 messages
2021/04/08
[#103342] [Ruby master Feature#17790] Have a way to clear a String without resetting its capacity — jean.boussier@...
Issue #17790 has been reported by byroot (Jean Boussier).
14 messages
2021/04/09
[#103388] [ANN] Multi-factor Authentication of bugs.ruby-lang.org — SHIBATA Hiroshi <hsbt@...>
Hello,
5 messages
2021/04/12
[#103414] Re: [ANN] Multi-factor Authentication of bugs.ruby-lang.org
— Martin J. Dürst <duerst@...>
2021/04/13
Is there a way to use this multi-factor authentication for (like me)
[#103547] List of CI sites to check — Martin J. Dürst <duerst@...>
Hello everybody,
4 messages
2021/04/22
[#103596] [Ruby master Feature#17830] Add Integer#previous and Integer#prev — rafasoaresms@...
Issue #17830 has been reported by rafasoares (Rafael Soares).
9 messages
2021/04/26
[ruby-core:103314] [Ruby master Feature#6470] Make attr_accessor return the list of generated method
From:
get.codetriage@...
Date:
2021-04-08 18:02:14 UTC
List:
ruby-core #103314
Issue #6470 has been updated by schneems (Richard Schneeman).
This is implemented https://twitter.com/avdi/status/1380213296108867586. Let's close this ticket!
:)
----------------------------------------
Feature #6470: Make attr_accessor return the list of generated method
https://bugs.ruby-lang.org/issues/6470#change-91400
* Author: rupert (Robert Pankowecki)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
attr_accesor currently returns nil. It would be more helpful if it return list of generated methods so that it can become an argument to other methods like :private or :protected. That way private accessors can still be defined at top of the class and be private without changing the visibility of next methods.
```
class Something
private *attr_accessor :user, :action # IMHO This is nice
# private attr_accessor :user, :action # <-- would be even better if :private method accepted arrays
def initialize(user, action)
self.user = user
self.action = action
end
def public_method
user.do_something(action)
end
end
```
VS
```
class Something
private; attr_accessor :user, :action; public # IMHO Hack!!
def initialize(user, action)
self.user = user
self.action = action
end
def public_method
user.do_something(action)
end
end
```
VS
```
class Something
def initialize(user, action)
self.user = user
self.action = action
end
def public_method
user.do_something(action)
end
private
attr_accessor :user, :action # IMHO Does not look nice at bottom of the class definition
end
```
--
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>