[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

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

11 messages 2018/01/15
[#85364] Re: [Ruby trunk Bug#14357] thread_safe tests suite segfaults — Eric Wong <normalperson@...> 2018/02/03

v.ondruch@tiscali.cz wrote:

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:85113] [Ruby trunk Feature#14397] public, protected and private should return their arguments instead of self

From: eregontp@...
Date: 2018-01-25 12:23:36 UTC
List: ruby-core #85113
Issue #14397 has been updated by Eregon (Benoit Daloze).


Would it be simpler for the semantics to always return an Array of symbols?
Otherwise `final` (and other potential uses) has to handle both a single Symbol and an Array of Symbol.

One concern is the extra allocations for the common case of a single argument given to `private`.

----------------------------------------
Feature #14397: public, protected and private should return their arguments instead of self
https://bugs.ruby-lang.org/issues/14397#change-69828

* Author: usa (Usaku NAKAMURA)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 2.6
----------------------------------------
Matsuda-san suggested me that `public`, `protected` and `private` should return their arguments instead of `self`,
to write such code:`

```Ruby
require "finalist"
# see https://github.com/joker1007/finalist

class Foo
  extend Finalist

  final private def foo
  end
end
```

I believe that it's reasonable request, and also believe that there is no product code which uses the return values of `public`, `protected` and `private`.
Matz, how do you think about this change?
The patch is attached.


---Files--------------------------------
return_values_of_visibility_methods.diff (7.47 KB)


-- 
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