[ruby-dev:50429] [Ruby trunk Feature#14396][Rejected] public, protected and private should return their arguments instead of self
From:
usa@...
Date:
2018-01-24 21:28:26 UTC
List:
ruby-dev #50429
Issue #14396 has been updated by usa (Usaku NAKAMURA). Status changed from Assigned to Rejected =E8=AA=A4=E3=81=A3=E3=81=A6ruby-dev=E3=81=AB=E6=8A=95=E3=81=92=E3=81=A6=E3= =81=97=E3=81=BE=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E3=81=93=E3=81=A3=E3=81= =A1=E3=81=AF=E9=96=89=E3=81=98=E3=81=BE=E3=81=99=E3=80=82 [Feature #14397] =E3=82=92=E5=8F=82=E7=85=A7=E3=80=82 ---------------------------------------- Feature #14396: public, protected and private should return their arguments= instead of self https://bugs.ruby-lang.org/issues/14396#change-69794 * Author: usa (Usaku NAKAMURA) * Status: Rejected * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: 2.6 ---------------------------------------- Matsuda-san suggested me that `public`, `protected` and `private` should re= turn 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 p= roduct code which uses the return value of `public`, `protected` and `priva= te`. Matz, how about this change? The patch is attached. ---Files-------------------------------- return_values_of_visibility_methods.diff (7.47 KB) --=20 https://bugs.ruby-lang.org/